[PATCH] arm64/mpam: Add build dependencies for CONFIG_RESCTRL_IOMMU
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC03L1 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?h=mp... -------------------------------- On the ARM64 architecture, the CONFIG_RESCTRL_IOMMU actually depends on the CONFIG_ARM_SMMU_V3, which allows to bind SMMU iommu_groups with resctrl groups. Therefore, add this build dependency in Kconfig. Additionally, to avoid compilation errors due to re-definitions in the include/linux/resctrl.h header file when the CONFIG_RESCTRL_IOMMU is disabled, add the build switch for resctrl_arch_*_iommu_closid_rmid(). Fixes: 7e3f95a1a861 ("fs/resctrl: Add support for assigning iommu_groups to resctrl groups") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/platform/mpam/Kconfig | 2 +- drivers/platform/mpam/mpam_resctrl.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/mpam/Kconfig b/drivers/platform/mpam/Kconfig index a6e937b8f91d..96dd7c091a9f 100644 --- a/drivers/platform/mpam/Kconfig +++ b/drivers/platform/mpam/Kconfig @@ -6,4 +6,4 @@ config ARM_CPU_RESCTRL depends on ARM64 && ARCH_HAS_CPU_RESCTRL depends on MISC_FILESYSTEMS select RESCTRL_RMID_DEPENDS_ON_CLOSID - select RESCTRL_IOMMU + select RESCTRL_IOMMU if ARM_SMMU_V3 diff --git a/drivers/platform/mpam/mpam_resctrl.c b/drivers/platform/mpam/mpam_resctrl.c index 2d3a1827a48c..7c386ce7b80f 100644 --- a/drivers/platform/mpam/mpam_resctrl.c +++ b/drivers/platform/mpam/mpam_resctrl.c @@ -260,6 +260,7 @@ bool resctrl_arch_match_rmid(struct task_struct *tsk, u32 closid, u32 rmid) return (tsk_closid == closid) && (tsk_rmid == rmid); } +#ifdef CONFIG_RESCTRL_IOMMU int resctrl_arch_set_iommu_closid_rmid(struct iommu_group *group, u32 closid, u32 rmid) { @@ -302,6 +303,7 @@ bool resctrl_arch_match_iommu_closid_rmid(struct iommu_group *group, return (partid == closid) && (rmid == pmg); } +#endif struct rdt_resource *resctrl_arch_get_resource(enum resctrl_res_level l) { -- 2.25.1
participants (1)
-
Zeng Heng