Skip to content

Commit 1b0e3ea

Browse files
Yicong Yangwilldeacon
authored andcommitted
perf/smmuv3: Add MODULE_ALIAS for module auto loading
On my ACPI based arm64 server, if the SMMUv3 PMU is configured as module it won't be loaded automatically after booting even if the device has already been scanned and added. It's because the module lacks a platform alias, the uevent mechanism and userspace tools like udevd make use of this to find the target driver module of the device. This patch adds the missing platform alias of the module, then module will be loaded automatically if device exists. Before this patch: [root@localhost tmp]# modinfo arm_smmuv3_pmu | grep alias alias: of:N*T*Carm,smmu-v3-pmcgC* alias: of:N*T*Carm,smmu-v3-pmcg After this patch: [root@localhost tmp]# modinfo arm_smmuv3_pmu | grep alias alias: platform:arm-smmu-v3-pmcg alias: of:N*T*Carm,smmu-v3-pmcgC* alias: of:N*T*Carm,smmu-v3-pmcg Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20230814131642.65263-1-yangyicong@huawei.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 0242737 commit 1b0e3ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/perf/arm_smmuv3_pmu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,7 @@ static void __exit arm_smmu_pmu_exit(void)
10281028

10291029
module_exit(arm_smmu_pmu_exit);
10301030

1031+
MODULE_ALIAS("platform:arm-smmu-v3-pmcg");
10311032
MODULE_DESCRIPTION("PMU driver for ARM SMMUv3 Performance Monitors Extension");
10321033
MODULE_AUTHOR("Neil Leeder <nleeder@codeaurora.org>");
10331034
MODULE_AUTHOR("Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>");

0 commit comments

Comments
 (0)