diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2022-09-30 18:27:05 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-09-30 18:35:52 +1000 |
commit | bd649d40e0f2ffa1e16b4dbb93dc627177410e78 (patch) | |
tree | c76a0c1bf2e5374cd8e2054f67e3b4d0f502267f /arch/powerpc/kernel/prom.c | |
parent | 41dc056391b334fae646b55ee020bfa8f67b60c8 (diff) | |
download | linux-bd649d40e0f2ffa1e16b4dbb93dc627177410e78.tar.gz linux-bd649d40e0f2ffa1e16b4dbb93dc627177410e78.tar.bz2 linux-bd649d40e0f2ffa1e16b4dbb93dc627177410e78.zip |
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
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 2e7a04dab2f7..09f07cc57216 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -30,6 +30,7 @@ #include <linux/libfdt.h> #include <linux/cpu.h> #include <linux/pgtable.h> +#include <linux/seq_buf.h> #include <asm/rtas.h> #include <asm/page.h> @@ -819,6 +820,9 @@ 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, ...) */ |