Patch "MIPS: cpu-features: Use boot_cpu_type for CPU type based features" 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

    MIPS: cpu-features: Use boot_cpu_type for CPU type based features

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:
     mips-cpu-features-use-boot_cpu_type-for-cpu-type-bas.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 08118d67bebd9863a656016c0b009baac088d653
Author: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
Date:   Wed Jun 7 13:51:22 2023 +0800

    MIPS: cpu-features: Use boot_cpu_type for CPU type based features
    
    [ Upstream commit 5487a7b60695a92cf998350e4beac17144c91fcd ]
    
    Some CPU feature macros were using current_cpu_type to mark feature
    availability.
    
    However current_cpu_type will use smp_processor_id, which is prohibited
    under preemptable context.
    
    Since those features are all uniform on all CPUs in a SMP system, use
    boot_cpu_type instead of current_cpu_type to fix preemptable kernel.
    
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 53c8551ec89bc..e0a4da4cfd8bc 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -125,7 +125,7 @@
 ({									\
 	int __res;							\
 									\
-	switch (current_cpu_type()) {					\
+	switch (boot_cpu_type()) {					\
 	case CPU_CAVIUM_OCTEON:						\
 	case CPU_CAVIUM_OCTEON_PLUS:					\
 	case CPU_CAVIUM_OCTEON2:					\
@@ -368,7 +368,7 @@
 ({									\
 	int __res;							\
 									\
-	switch (current_cpu_type()) {					\
+	switch (boot_cpu_type()) {					\
 	case CPU_M14KC:							\
 	case CPU_74K:							\
 	case CPU_1074K:							\



[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