Patch "LoongArch: Lately init pmu after smp is online" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    LoongArch: Lately init pmu after smp is online

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     loongarch-lately-init-pmu-after-smp-is-online.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cd26219a8d45c87f0adc85225f10984346b8fb32
Author: Bibo Mao <maobibo@xxxxxxxxxxx>
Date:   Thu Apr 25 22:17:52 2024 +0800

    LoongArch: Lately init pmu after smp is online
    
    [ Upstream commit f3334ebb8a2a1841c2824594dd992e66de19deb2 ]
    
    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 <maobibo@xxxxxxxxxxx>
    Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/loongarch/kernel/perf_event.c b/arch/loongarch/kernel/perf_event.c
index 3a2edb157b65a..1563bf47f3e2c 100644
--- a/arch/loongarch/kernel/perf_event.c
+++ b/arch/loongarch/kernel/perf_event.c
@@ -884,4 +884,4 @@ static int __init init_hw_perf_events(void)
 
 	return 0;
 }
-early_initcall(init_hw_perf_events);
+pure_initcall(init_hw_perf_events);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux