Patch "powerpc/prom: Add CPU info to hardware description string later" 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

    powerpc/prom: Add CPU info to hardware description string later

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:
     powerpc-prom-add-cpu-info-to-hardware-description-st.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 cd7519d63a61d845c2a826f5238b6a82df733ed4
Author: Nathan Lynch <nathanl@xxxxxxxxxxxxx>
Date:   Mon Jun 3 07:36:55 2024 -0500

    powerpc/prom: Add CPU info to hardware description string later
    
    [ Upstream commit 7bdd1c6c87de758750d419eedab7285b95b66417 ]
    
    cur_cpu_spec->cpu_name is appended to ppc_hw_desc before cur_cpu_spec
    has taken on its final value. This is illustrated on pseries by
    comparing the CPU name as reported at boot ("POWER8E (raw)") to the
    contents of /proc/cpuinfo ("POWER8 (architected)"):
    
      $ dmesg | grep Hardware
      Hardware name: IBM,8408-E8E POWER8E (raw) 0x4b0201 0xf000004 \
        of:IBM,FW860.50 (SV860_146) hv:phyp pSeries
    
      $ grep -m 1 ^cpu /proc/cpuinfo
      cpu             : POWER8 (architected), altivec supported
    
    Some 44x models would appear to be affected as well; see
    identical_pvr_fixup().
    
    This results in incorrect CPU information in stack dumps --
    ppc_hw_desc is an input to dump_stack_set_arch_desc().
    
    Delay gathering the CPU name until after all potential calls to
    identify_cpu().
    
    Signed-off-by: Nathan Lynch <nathanl@xxxxxxxxxxxxx>
    Fixes: bd649d40e0f2 ("powerpc: Add PVR & CPU name to hardware description")
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://msgid.link/20240603-fix-cpu-hwdesc-v1-1-945f2850fcaa@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 9531ab90feb8a..e5b90d67cd536 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -324,6 +324,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
 					  void *data)
 {
 	const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
+	const __be32 *cpu_version = NULL;
 	const __be32 *prop;
 	const __be32 *intserv;
 	int i, nthreads;
@@ -404,7 +405,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
 		prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
 		if (prop && (be32_to_cpup(prop) & 0xff000000) == 0x0f000000) {
 			identify_cpu(0, be32_to_cpup(prop));
-			seq_buf_printf(&ppc_hw_desc, "0x%04x ", be32_to_cpup(prop));
+			cpu_version = prop;
 		}
 
 		check_cpu_feature_properties(node);
@@ -415,6 +416,12 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
 	}
 
 	identical_pvr_fixup(node);
+
+	// We can now add the CPU name & PVR to the hardware description
+	seq_buf_printf(&ppc_hw_desc, "%s 0x%04lx ", cur_cpu_spec->cpu_name, mfspr(SPRN_PVR));
+	if (cpu_version)
+		seq_buf_printf(&ppc_hw_desc, "0x%04x ", be32_to_cpup(cpu_version));
+
 	init_mmu_slb_size(node);
 
 #ifdef CONFIG_PPC64
@@ -852,9 +859,6 @@ void __init early_init_devtree(void *params)
 
 	dt_cpu_ftrs_scan();
 
-	// We can now add the CPU name & PVR to the hardware description
-	seq_buf_printf(&ppc_hw_desc, "%s 0x%04lx ", cur_cpu_spec->cpu_name, mfspr(SPRN_PVR));
-
 	/* Retrieve CPU related informations from the flat tree
 	 * (altivec support, boot CPU ID, ...)
 	 */




[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