Thread (34 messages) 34 messages, 3 authors, 2025-02-25

Re: [PATCH v7 12/14] iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster

From: Nicolin Chen <hidden>
Date: 2025-02-25 17:22:30
Also in: linux-doc, linux-iommu, linux-kselftest, linux-patches, lkml

On Tue, Feb 25, 2025 at 05:08:16PM +0000, Pranjal Shrivastava wrote:
quoted
@@ -824,6 +829,9 @@ struct arm_smmu_master {
        struct arm_smmu_device          *smmu;
        struct device                   *dev;
        struct arm_smmu_stream          *streams;
+#ifdef CONFIG_ARM_SMMU_V3_IOMMUFD
+       struct arm_smmu_vmaster         *vmaster; /* use smmu->streams_mutex */
+#endif
        /* Locked by the iommu core using the group mutex */
        struct arm_smmu_ctx_desc_cfg    cd_table;
        unsigned int                    num_streams;
@@ -972,6 +980,9 @@ struct arm_smmu_attach_state {
        bool disable_ats;
        ioasid_t ssid;
        /* Resulting state */
+#ifdef CONFIG_ARM_SMMU_V3_IOMMUFD
+       struct arm_smmu_vmaster *vmaster;
+#endif
        bool ats_enabled;
 };
Umm.. I'm not too sure how I feel about these #ifdefs _between_ a struct
definition. Given that currently, the arm_smmu_v3.h file doesn't have
such `#ifdef CONFIG`s between structs. I'd say, in case
CONFIG_ARM_SMMU_V3_IOMMUFD is turned off, we can simply leave the
vmaster ptr NULL?
 
OK. Will drop..

Nicolin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help