aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/cputable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/cputable.h')
-rw-r--r--include/asm-powerpc/cputable.h40
1 files changed, 27 insertions, 13 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index d1cfa3f515ea..64210549f56b 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -1,7 +1,6 @@
1#ifndef __ASM_POWERPC_CPUTABLE_H 1#ifndef __ASM_POWERPC_CPUTABLE_H
2#define __ASM_POWERPC_CPUTABLE_H 2#define __ASM_POWERPC_CPUTABLE_H
3 3
4#include <linux/config.h>
5#include <asm/asm-compat.h> 4#include <asm/asm-compat.h>
6 5
7#define PPC_FEATURE_32 0x80000000 6#define PPC_FEATURE_32 0x80000000
@@ -20,6 +19,7 @@
20#define PPC_FEATURE_POWER5 0x00040000 19#define PPC_FEATURE_POWER5 0x00040000
21#define PPC_FEATURE_POWER5_PLUS 0x00020000 20#define PPC_FEATURE_POWER5_PLUS 0x00020000
22#define PPC_FEATURE_CELL 0x00010000 21#define PPC_FEATURE_CELL 0x00010000
22#define PPC_FEATURE_BOOKE 0x00008000
23 23
24#ifdef __KERNEL__ 24#ifdef __KERNEL__
25#ifndef __ASSEMBLY__ 25#ifndef __ASSEMBLY__
@@ -28,10 +28,17 @@
28 * via the mkdefs mechanism. 28 * via the mkdefs mechanism.
29 */ 29 */
30struct cpu_spec; 30struct cpu_spec;
31struct op_powerpc_model;
32 31
33typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); 32typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec);
34 33
34enum powerpc_oprofile_type {
35 PPC_OPROFILE_INVALID = 0,
36 PPC_OPROFILE_RS64 = 1,
37 PPC_OPROFILE_POWER4 = 2,
38 PPC_OPROFILE_G4 = 3,
39 PPC_OPROFILE_BOOKE = 4,
40};
41
35struct cpu_spec { 42struct cpu_spec {
36 /* CPU is matched via (PVR & pvr_mask) == pvr_value */ 43 /* CPU is matched via (PVR & pvr_mask) == pvr_value */
37 unsigned int pvr_mask; 44 unsigned int pvr_mask;
@@ -57,7 +64,10 @@ struct cpu_spec {
57 char *oprofile_cpu_type; 64 char *oprofile_cpu_type;
58 65
59 /* Processor specific oprofile operations */ 66 /* Processor specific oprofile operations */
60 struct op_powerpc_model *oprofile_model; 67 enum powerpc_oprofile_type oprofile_type;
68
69 /* Name of processor class, for the ELF AT_PLATFORM entry */
70 char *platform;
61}; 71};
62 72
63extern struct cpu_spec *cur_cpu_spec; 73extern struct cpu_spec *cur_cpu_spec;
@@ -106,6 +116,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
106#define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) 116#define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000)
107#define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) 117#define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000)
108#define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000) 118#define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000)
119#define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0000200000000000)
109#else 120#else
110/* ensure on 32b processors the flags are available for compiling but 121/* ensure on 32b processors the flags are available for compiling but
111 * don't do anything */ 122 * don't do anything */
@@ -305,12 +316,18 @@ enum {
305 CPU_FTR_MMCRA_SIHV, 316 CPU_FTR_MMCRA_SIHV,
306 CPU_FTRS_CELL = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | 317 CPU_FTRS_CELL = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
307 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | 318 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 |
308 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT, 319 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT |
320 CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO,
309 CPU_FTRS_COMPATIBLE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | 321 CPU_FTRS_COMPATIBLE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
310 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2, 322 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2,
311#endif 323#endif
312 324
313 CPU_FTRS_POSSIBLE = 325 CPU_FTRS_POSSIBLE =
326#ifdef __powerpc64__
327 CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 |
328 CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL |
329 CPU_FTR_CI_LARGE_PAGE |
330#else
314#if CLASSIC_PPC 331#if CLASSIC_PPC
315 CPU_FTRS_PPC601 | CPU_FTRS_603 | CPU_FTRS_604 | CPU_FTRS_740_NOTAU | 332 CPU_FTRS_PPC601 | CPU_FTRS_603 | CPU_FTRS_604 | CPU_FTRS_740_NOTAU |
316 CPU_FTRS_740 | CPU_FTRS_750 | CPU_FTRS_750FX1 | 333 CPU_FTRS_740 | CPU_FTRS_750 | CPU_FTRS_750FX1 |
@@ -344,14 +361,14 @@ enum {
344#ifdef CONFIG_E500 361#ifdef CONFIG_E500
345 CPU_FTRS_E500 | CPU_FTRS_E500_2 | 362 CPU_FTRS_E500 | CPU_FTRS_E500_2 |
346#endif 363#endif
347#ifdef __powerpc64__ 364#endif /* __powerpc64__ */
348 CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 |
349 CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL |
350 CPU_FTR_CI_LARGE_PAGE |
351#endif
352 0, 365 0,
353 366
354 CPU_FTRS_ALWAYS = 367 CPU_FTRS_ALWAYS =
368#ifdef __powerpc64__
369 CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 &
370 CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_CELL &
371#else
355#if CLASSIC_PPC 372#if CLASSIC_PPC
356 CPU_FTRS_PPC601 & CPU_FTRS_603 & CPU_FTRS_604 & CPU_FTRS_740_NOTAU & 373 CPU_FTRS_PPC601 & CPU_FTRS_603 & CPU_FTRS_604 & CPU_FTRS_740_NOTAU &
357 CPU_FTRS_740 & CPU_FTRS_750 & CPU_FTRS_750FX1 & 374 CPU_FTRS_740 & CPU_FTRS_750 & CPU_FTRS_750FX1 &
@@ -385,10 +402,7 @@ enum {
385#ifdef CONFIG_E500 402#ifdef CONFIG_E500
386 CPU_FTRS_E500 & CPU_FTRS_E500_2 & 403 CPU_FTRS_E500 & CPU_FTRS_E500_2 &
387#endif 404#endif
388#ifdef __powerpc64__ 405#endif /* __powerpc64__ */
389 CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 &
390 CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_CELL &
391#endif
392 CPU_FTRS_POSSIBLE, 406 CPU_FTRS_POSSIBLE,
393}; 407};
394 408