Skip to content

Commit 68f2f0d

Browse files
mpeozbenh
authored andcommitted
powerpc: Add a cpu feature CPU_FTR_PMAO_BUG
Some power8 revisions have a hardware bug where we can lose a Performance Monitor (PMU) exception under certain circumstances. We will be adding a workaround for this case, see the next commit for details. The observed behaviour is that writing PMAO doesn't cause an exception as we would expect, hence the name of the feature. Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent 5f6d038 commit 68f2f0d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

arch/powerpc/include/asm/cputable.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ extern const char *powerpc_base_platform;
189189
#define CPU_FTR_HAS_PPR LONG_ASM_CONST(0x0200000000000000)
190190
#define CPU_FTR_DAWR LONG_ASM_CONST(0x0400000000000000)
191191
#define CPU_FTR_DABRX LONG_ASM_CONST(0x0800000000000000)
192+
#define CPU_FTR_PMAO_BUG LONG_ASM_CONST(0x1000000000000000)
192193

193194
#ifndef __ASSEMBLY__
194195

@@ -445,6 +446,7 @@ extern const char *powerpc_base_platform;
445446
CPU_FTR_ICSWX | CPU_FTR_CFAR | CPU_FTR_HVMODE | CPU_FTR_VMX_COPY | \
446447
CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_DAWR | \
447448
CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP)
449+
#define CPU_FTRS_POWER8E (CPU_FTRS_POWER8 | CPU_FTR_PMAO_BUG)
448450
#define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
449451
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
450452
CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
@@ -466,8 +468,8 @@ extern const char *powerpc_base_platform;
466468
#define CPU_FTRS_POSSIBLE \
467469
(CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \
468470
CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \
469-
CPU_FTRS_POWER7 | CPU_FTRS_POWER8 | CPU_FTRS_CELL | \
470-
CPU_FTRS_PA6T | CPU_FTR_VSX)
471+
CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | CPU_FTRS_POWER8 | \
472+
CPU_FTRS_CELL | CPU_FTRS_PA6T | CPU_FTR_VSX)
471473
#endif
472474
#else
473475
enum {

arch/powerpc/kernel/cputable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
510510
.pvr_mask = 0xffff0000,
511511
.pvr_value = 0x004b0000,
512512
.cpu_name = "POWER8E (raw)",
513-
.cpu_features = CPU_FTRS_POWER8,
513+
.cpu_features = CPU_FTRS_POWER8E,
514514
.cpu_user_features = COMMON_USER_POWER8,
515515
.cpu_user_features2 = COMMON_USER2_POWER8,
516516
.mmu_features = MMU_FTRS_POWER8,

0 commit comments

Comments
 (0)