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.h37
1 files changed, 12 insertions, 25 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 12707ab9dc98..a9a40149a7c0 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -89,8 +89,11 @@ struct cpu_spec {
89 89
90extern struct cpu_spec *cur_cpu_spec; 90extern struct cpu_spec *cur_cpu_spec;
91 91
92extern void identify_cpu(unsigned long offset, unsigned long cpu); 92extern unsigned int __start___ftr_fixup, __stop___ftr_fixup;
93extern void do_cpu_ftr_fixups(unsigned long offset); 93
94extern struct cpu_spec *identify_cpu(unsigned long offset);
95extern void do_feature_fixups(unsigned long value, void *fixup_start,
96 void *fixup_end);
94 97
95#endif /* __ASSEMBLY__ */ 98#endif /* __ASSEMBLY__ */
96 99
@@ -144,6 +147,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
144#define CPU_FTR_CI_LARGE_PAGE LONG_ASM_CONST(0x0000100000000000) 147#define CPU_FTR_CI_LARGE_PAGE LONG_ASM_CONST(0x0000100000000000)
145#define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000) 148#define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000)
146#define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) 149#define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000)
150#define CPU_FTR_CELL_TB_BUG LONG_ASM_CONST(0x0000800000000000)
147 151
148#ifndef __ASSEMBLY__ 152#ifndef __ASSEMBLY__
149 153
@@ -332,7 +336,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
332#define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 336#define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
333 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ 337 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
334 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ 338 CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
335 CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE) 339 CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE | CPU_FTR_CELL_TB_BUG)
336#define CPU_FTRS_PA6T (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ 340#define CPU_FTRS_PA6T (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
337 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ 341 CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \
338 CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \ 342 CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \
@@ -431,29 +435,12 @@ static inline int cpu_has_feature(unsigned long feature)
431 435
432#ifdef __ASSEMBLY__ 436#ifdef __ASSEMBLY__
433 437
434#define BEGIN_FTR_SECTION 98: 438#define BEGIN_FTR_SECTION_NESTED(label) label:
435 439#define BEGIN_FTR_SECTION BEGIN_FTR_SECTION_NESTED(97)
436#ifndef __powerpc64__ 440#define END_FTR_SECTION_NESTED(msk, val, label) \
441 MAKE_FTR_SECTION_ENTRY(msk, val, label, __ftr_fixup)
437#define END_FTR_SECTION(msk, val) \ 442#define END_FTR_SECTION(msk, val) \
43899: \ 443 END_FTR_SECTION_NESTED(msk, val, 97)
439 .section __ftr_fixup,"a"; \
440 .align 2; \
441 .long msk; \
442 .long val; \
443 .long 98b; \
444 .long 99b; \
445 .previous
446#else /* __powerpc64__ */
447#define END_FTR_SECTION(msk, val) \
44899: \
449 .section __ftr_fixup,"a"; \
450 .align 3; \
451 .llong msk; \
452 .llong val; \
453 .llong 98b; \
454 .llong 99b; \
455 .previous
456#endif /* __powerpc64__ */
457 444
458#define END_FTR_SECTION_IFSET(msk) END_FTR_SECTION((msk), (msk)) 445#define END_FTR_SECTION_IFSET(msk) END_FTR_SECTION((msk), (msk))
459#define END_FTR_SECTION_IFCLR(msk) END_FTR_SECTION((msk), 0) 446#define END_FTR_SECTION_IFCLR(msk) END_FTR_SECTION((msk), 0)