Skip to content

Commit 327da00

Browse files
maddy-kerneldevmpe
authored andcommitted
powerpc: Add POWER10 raw mode cputable entry
Add a raw mode cputable entry for POWER10. Copies most of the fields from commit a3ea40d ("powerpc: Add POWER10 architected mode") except for oprofile_cpu_type, machine_check_early, pvr_mask and pvr_mask fields. On bare metal systems we use DT CPU features, which doesn't need a cputable entry. But in VMs we still rely on the raw cputable entry to set the correct values for the PMU related fields. Fixes: a3ea40d ("powerpc: Add POWER10 architected mode") Signed-off-by: Madhavan Srinivasan <[email protected]> [mpe: Reorder vs cleanup patch and add Fixes tag] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d735599 commit 327da00

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

arch/powerpc/kernel/cputable.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ extern void __restore_cpu_power10(void);
7575
extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
7676
extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
7777
extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
78+
extern long __machine_check_early_realmode_p10(struct pt_regs *regs);
7879
#endif /* CONFIG_PPC64 */
7980
#if defined(CONFIG_E500)
8081
extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
@@ -542,6 +543,25 @@ static struct cpu_spec __initdata cpu_specs[] = {
542543
.machine_check_early = __machine_check_early_realmode_p9,
543544
.platform = "power9",
544545
},
546+
{ /* Power10 */
547+
.pvr_mask = 0xffff0000,
548+
.pvr_value = 0x00800000,
549+
.cpu_name = "POWER10 (raw)",
550+
.cpu_features = CPU_FTRS_POWER10,
551+
.cpu_user_features = COMMON_USER_POWER10,
552+
.cpu_user_features2 = COMMON_USER2_POWER10,
553+
.mmu_features = MMU_FTRS_POWER10,
554+
.icache_bsize = 128,
555+
.dcache_bsize = 128,
556+
.num_pmcs = 6,
557+
.pmc_type = PPC_PMC_IBM,
558+
.oprofile_cpu_type = "ppc64/power10",
559+
.oprofile_type = PPC_OPROFILE_INVALID,
560+
.cpu_setup = __setup_cpu_power10,
561+
.cpu_restore = __restore_cpu_power10,
562+
.machine_check_early = __machine_check_early_realmode_p10,
563+
.platform = "power10",
564+
},
545565
{ /* Cell Broadband Engine */
546566
.pvr_mask = 0xffff0000,
547567
.pvr_value = 0x00700000,

0 commit comments

Comments
 (0)