Skip to content

Commit f3334eb

Browse files
bibo-maochenhuacai
authored andcommitted
LoongArch: Lately init pmu after smp is online
There is an smp function call named reset_counters() to init PMU registers of every CPU in PMU initialization state. It requires that all CPUs are online. However there is an early_initcall() wrapper for the PMU init funciton init_hw_perf_events(), so that pmu init funciton is called in do_pre_smp_initcalls() which before function smp_init(). Function reset_counters() cannot work on other CPUs since they haven't boot up still. Here replace the wrapper early_initcall() with pure_initcall(), so that the PMU init function is called after every cpu is online. Signed-off-by: Bibo Mao <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent d3119bc commit f3334eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/loongarch/kernel/perf_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,4 +884,4 @@ static int __init init_hw_perf_events(void)
884884

885885
return 0;
886886
}
887-
early_initcall(init_hw_perf_events);
887+
pure_initcall(init_hw_perf_events);

0 commit comments

Comments
 (0)