From 82e2f45f930ffae0a9b3cde238d687dc5e78f929 Mon Sep 17 00:00:00 2001 From: Xingang Wang Date: Thu, 6 Jan 2022 20:40:26 +0800 Subject: [PATCH] arm64/mpam: fix mpam probe error for wrong init order ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I49RB2 CVE: NA --------------------------------------------------- The mpam init procedure failed when probe with ACPI: [ 1.148657 ] ACPI MPAM: No CPU has cache with PPTT reference 0x72 [ 1.148658 ] ACPI MPAM: All CPUs must be online to probe mpam. [ 1.148660 ] ACPI MPAM: discovery failed: -19 This is because mpam need to be probed after all cpus be online, the arm_mpam_driver_init must be called after cacheinfo_sysfs_init, so the device_initcall should be replaced with device_initcall_sync. Fixes: b45bdb5a8604 ("arm64/mpam: add device tree support for mpam initialization") Signed-off-by: Xingang Wang Reviewed-by: Wang ShaoBo Reviewed-by: Cheng Jian Signed-off-by: Yang Yingliang --- arch/arm64/kernel/mpam/mpam_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/mpam/mpam_device.c b/arch/arm64/kernel/mpam/mpam_device.c index 4910e9934879..c7b5c50d431b 100644 --- a/arch/arm64/kernel/mpam/mpam_device.c +++ b/arch/arm64/kernel/mpam/mpam_device.c @@ -1876,4 +1876,4 @@ static int __init arm_mpam_driver_init(void) * We want to run after cacheinfo_sysfs_init() has caused the cacheinfo * structures to be populated. That runs as a device_initcall. */ -device_initcall(arm_mpam_driver_init); +device_initcall_sync(arm_mpam_driver_init); -- GitLab