Skip to content

Commit bd649d4

Browse files
committed
powerpc: Add PVR & CPU name to hardware description
Add the PVR and CPU name to the hardware description, which is printed at boot and in case of an oops. eg: Hardware name: ... POWER8E (raw) 0x4b0201 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220930082709.55830-2-mpe@ellerman.id.au
1 parent 41dc056 commit bd649d4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/powerpc/kernel/prom.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <linux/libfdt.h>
3131
#include <linux/cpu.h>
3232
#include <linux/pgtable.h>
33+
#include <linux/seq_buf.h>
3334

3435
#include <asm/rtas.h>
3536
#include <asm/page.h>
@@ -819,6 +820,9 @@ void __init early_init_devtree(void *params)
819820

820821
dt_cpu_ftrs_scan();
821822

823+
// We can now add the CPU name & PVR to the hardware description
824+
seq_buf_printf(&ppc_hw_desc, "%s 0x%04lx ", cur_cpu_spec->cpu_name, mfspr(SPRN_PVR));
825+
822826
/* Retrieve CPU related informations from the flat tree
823827
* (altivec support, boot CPU ID, ...)
824828
*/

0 commit comments

Comments
 (0)