[PATCH] powerpc: Add cputable entry for POWER6

Add a cputable entry for the POWER6 processor.

The SIHV and SIPR bits in the mmcra have moved in POWER6, so disable
support for that until oprofile is fixed.

Also tell firmware that we know about POWER6.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Anton Blanchard and committed by
Paul Mackerras
03054d51 09b03b6c

+27 -4
+16
arch/powerpc/kernel/cputable.c
··· 57 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 58 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ 59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 60 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 61 PPC_FEATURE_BOOKE) 62 ··· 264 .oprofile_cpu_type = "ppc64/power5+", 265 .oprofile_type = PPC_OPROFILE_POWER4, 266 .platform = "power5+", 267 }, 268 { /* Cell Broadband Engine */ 269 .pvr_mask = 0xffff0000,
··· 57 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 58 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ 59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 60 + #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ 61 + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 62 #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 63 PPC_FEATURE_BOOKE) 64 ··· 262 .oprofile_cpu_type = "ppc64/power5+", 263 .oprofile_type = PPC_OPROFILE_POWER4, 264 .platform = "power5+", 265 + }, 266 + { /* Power6 */ 267 + .pvr_mask = 0xffff0000, 268 + .pvr_value = 0x003e0000, 269 + .cpu_name = "POWER6", 270 + .cpu_features = CPU_FTRS_POWER6, 271 + .cpu_user_features = COMMON_USER_POWER6, 272 + .icache_bsize = 128, 273 + .dcache_bsize = 128, 274 + .num_pmcs = 6, 275 + .cpu_setup = __setup_cpu_power4, 276 + .oprofile_cpu_type = "ppc64/power6", 277 + .oprofile_type = PPC_OPROFILE_POWER4, 278 + .platform = "power6", 279 }, 280 { /* Cell Broadband Engine */ 281 .pvr_mask = 0xffff0000,
+1
arch/powerpc/kernel/prom_init.c
··· 686 */ 687 static unsigned char ibm_architecture_vec[] = { 688 W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ 689 W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */ 690 5 - 1, /* 5 option vectors */ 691
··· 686 */ 687 static unsigned char ibm_architecture_vec[] = { 688 W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ 689 + W(0xffff0000), W(0x003e0000), /* POWER6 */ 690 W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */ 691 5 - 1, /* 5 option vectors */ 692
+10 -4
include/asm-powerpc/cputable.h
··· 22 #define PPC_FEATURE_BOOKE 0x00008000 23 #define PPC_FEATURE_SMT 0x00004000 24 #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 25 26 #ifdef __KERNEL__ 27 #ifndef __ASSEMBLY__ ··· 321 CPU_FTR_MMCRA | CPU_FTR_SMT | \ 322 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 323 CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR) 324 #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 325 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ 326 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ ··· 337 #ifdef __powerpc64__ 338 #define CPU_FTRS_POSSIBLE \ 339 (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ 340 - CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL | \ 341 - CPU_FTR_CI_LARGE_PAGE) 342 #else 343 enum { 344 CPU_FTRS_POSSIBLE = ··· 382 #ifdef __powerpc64__ 383 #define CPU_FTRS_ALWAYS \ 384 (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ 385 - CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_CELL & \ 386 - CPU_FTRS_POSSIBLE) 387 #else 388 enum { 389 CPU_FTRS_ALWAYS =
··· 22 #define PPC_FEATURE_BOOKE 0x00008000 23 #define PPC_FEATURE_SMT 0x00004000 24 #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 25 + #define PPC_FEATURE_ARCH_2_05 0x00001000 26 27 #ifdef __KERNEL__ 28 #ifndef __ASSEMBLY__ ··· 320 CPU_FTR_MMCRA | CPU_FTR_SMT | \ 321 CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 322 CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR) 323 + #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 324 + CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ 325 + CPU_FTR_MMCRA | CPU_FTR_SMT | \ 326 + CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ 327 + CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE) 328 #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 329 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ 330 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ ··· 331 #ifdef __powerpc64__ 332 #define CPU_FTRS_POSSIBLE \ 333 (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ 334 + CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ 335 + CPU_FTRS_CELL | CPU_FTR_CI_LARGE_PAGE) 336 #else 337 enum { 338 CPU_FTRS_POSSIBLE = ··· 376 #ifdef __powerpc64__ 377 #define CPU_FTRS_ALWAYS \ 378 (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ 379 + CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ 380 + CPU_FTRS_CELL & CPU_FTRS_POSSIBLE) 381 #else 382 enum { 383 CPU_FTRS_ALWAYS =