Skip to content

Commit 7a853c2

Browse files
Fenghua Yusuryasaimadhu
authored andcommitted
mm: Change CONFIG option for mm->pasid field
This currently depends on CONFIG_IOMMU_SUPPORT. But it is only needed when CONFIG_IOMMU_SVA option is enabled. Change the CONFIG guards around definition and initialization of mm->pasid field. Suggested-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/20220207230254.3342514-3-fenghua.yu@intel.com
1 parent 7ba5647 commit 7a853c2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/mm_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ struct mm_struct {
631631
#endif
632632
struct work_struct async_put_work;
633633

634-
#ifdef CONFIG_IOMMU_SUPPORT
634+
#ifdef CONFIG_IOMMU_SVA
635635
u32 pasid;
636636
#endif
637637
} __randomize_layout;

kernel/fork.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ static void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
10211021

10221022
static void mm_init_pasid(struct mm_struct *mm)
10231023
{
1024-
#ifdef CONFIG_IOMMU_SUPPORT
1024+
#ifdef CONFIG_IOMMU_SVA
10251025
mm->pasid = INIT_PASID;
10261026
#endif
10271027
}

0 commit comments

Comments
 (0)