diff options
Diffstat (limited to 'include/asm-ppc64/processor.h')
-rw-r--r-- | include/asm-ppc64/processor.h | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index 3084099086a8..352306cfb579 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
21 | #include <asm/types.h> | 21 | #include <asm/types.h> |
22 | #include <asm/systemcfg.h> | 22 | #include <asm/systemcfg.h> |
23 | #include <asm/cputable.h> | ||
23 | 24 | ||
24 | /* Machine State Register (MSR) Fields */ | 25 | /* Machine State Register (MSR) Fields */ |
25 | #define MSR_SF_LG 63 /* Enable 64 bit mode */ | 26 | #define MSR_SF_LG 63 /* Enable 64 bit mode */ |
@@ -138,8 +139,16 @@ | |||
138 | #define SPRN_NIADORM 0x3F3 /* Hardware Implementation Register 2 */ | 139 | #define SPRN_NIADORM 0x3F3 /* Hardware Implementation Register 2 */ |
139 | #define SPRN_HID4 0x3F4 /* 970 HID4 */ | 140 | #define SPRN_HID4 0x3F4 /* 970 HID4 */ |
140 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ | 141 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ |
141 | #define SPRN_TSC 0x3FD /* Thread switch control */ | 142 | #define SPRN_HID6 0x3F9 /* BE HID 6 */ |
142 | #define SPRN_TST 0x3FC /* Thread switch timeout */ | 143 | #define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */ |
144 | #define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */ | ||
145 | #define SPRN_TSCR 0x399 /* Thread switch control on BE */ | ||
146 | #define SPRN_TTR 0x39A /* Thread switch timeout on BE */ | ||
147 | #define TSCR_DEC_ENABLE 0x200000 /* Decrementer Interrupt */ | ||
148 | #define TSCR_EE_ENABLE 0x100000 /* External Interrupt */ | ||
149 | #define TSCR_EE_BOOST 0x080000 /* External Interrupt Boost */ | ||
150 | #define SPRN_TSC 0x3FD /* Thread switch control on others */ | ||
151 | #define SPRN_TST 0x3FC /* Thread switch timeout on others */ | ||
143 | #define SPRN_L2CR 0x3F9 /* Level 2 Cache Control Regsiter */ | 152 | #define SPRN_L2CR 0x3F9 /* Level 2 Cache Control Regsiter */ |
144 | #define SPRN_LR 0x008 /* Link Register */ | 153 | #define SPRN_LR 0x008 /* Link Register */ |
145 | #define SPRN_PIR 0x3FF /* Processor Identification Register */ | 154 | #define SPRN_PIR 0x3FF /* Processor Identification Register */ |
@@ -259,6 +268,7 @@ | |||
259 | #define PV_970FX 0x003C | 268 | #define PV_970FX 0x003C |
260 | #define PV_630 0x0040 | 269 | #define PV_630 0x0040 |
261 | #define PV_630p 0x0041 | 270 | #define PV_630p 0x0041 |
271 | #define PV_BE 0x0070 | ||
262 | 272 | ||
263 | /* Platforms supported by PPC64 */ | 273 | /* Platforms supported by PPC64 */ |
264 | #define PLATFORM_PSERIES 0x0100 | 274 | #define PLATFORM_PSERIES 0x0100 |
@@ -267,6 +277,7 @@ | |||
267 | #define PLATFORM_LPAR 0x0001 | 277 | #define PLATFORM_LPAR 0x0001 |
268 | #define PLATFORM_POWERMAC 0x0400 | 278 | #define PLATFORM_POWERMAC 0x0400 |
269 | #define PLATFORM_MAPLE 0x0500 | 279 | #define PLATFORM_MAPLE 0x0500 |
280 | #define PLATFORM_BPA 0x1000 | ||
270 | 281 | ||
271 | /* Compatibility with drivers coming from PPC32 world */ | 282 | /* Compatibility with drivers coming from PPC32 world */ |
272 | #define _machine (systemcfg->platform) | 283 | #define _machine (systemcfg->platform) |
@@ -278,6 +289,7 @@ | |||
278 | #define IC_INVALID 0 | 289 | #define IC_INVALID 0 |
279 | #define IC_OPEN_PIC 1 | 290 | #define IC_OPEN_PIC 1 |
280 | #define IC_PPC_XIC 2 | 291 | #define IC_PPC_XIC 2 |
292 | #define IC_BPA_IIC 3 | ||
281 | 293 | ||
282 | #define XGLUE(a,b) a##b | 294 | #define XGLUE(a,b) a##b |
283 | #define GLUE(a,b) XGLUE(a,b) | 295 | #define GLUE(a,b) XGLUE(a,b) |
@@ -490,24 +502,37 @@ static inline void ppc64_runlatch_on(void) | |||
490 | { | 502 | { |
491 | unsigned long ctrl; | 503 | unsigned long ctrl; |
492 | 504 | ||
493 | ctrl = mfspr(SPRN_CTRLF); | 505 | if (cpu_has_feature(CPU_FTR_CTRL)) { |
494 | ctrl |= CTRL_RUNLATCH; | 506 | ctrl = mfspr(SPRN_CTRLF); |
495 | mtspr(SPRN_CTRLT, ctrl); | 507 | ctrl |= CTRL_RUNLATCH; |
508 | mtspr(SPRN_CTRLT, ctrl); | ||
509 | } | ||
496 | } | 510 | } |
497 | 511 | ||
498 | static inline void ppc64_runlatch_off(void) | 512 | static inline void ppc64_runlatch_off(void) |
499 | { | 513 | { |
500 | unsigned long ctrl; | 514 | unsigned long ctrl; |
501 | 515 | ||
502 | ctrl = mfspr(SPRN_CTRLF); | 516 | if (cpu_has_feature(CPU_FTR_CTRL)) { |
503 | ctrl &= ~CTRL_RUNLATCH; | 517 | ctrl = mfspr(SPRN_CTRLF); |
504 | mtspr(SPRN_CTRLT, ctrl); | 518 | ctrl &= ~CTRL_RUNLATCH; |
519 | mtspr(SPRN_CTRLT, ctrl); | ||
520 | } | ||
505 | } | 521 | } |
506 | 522 | ||
507 | #endif /* __KERNEL__ */ | 523 | #endif /* __KERNEL__ */ |
508 | 524 | ||
509 | #endif /* __ASSEMBLY__ */ | 525 | #endif /* __ASSEMBLY__ */ |
510 | 526 | ||
527 | #ifdef __KERNEL__ | ||
528 | #define RUNLATCH_ON(REG) \ | ||
529 | BEGIN_FTR_SECTION \ | ||
530 | mfspr (REG),SPRN_CTRLF; \ | ||
531 | ori (REG),(REG),CTRL_RUNLATCH; \ | ||
532 | mtspr SPRN_CTRLT,(REG); \ | ||
533 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) | ||
534 | #endif | ||
535 | |||
511 | /* | 536 | /* |
512 | * Number of entries in the SLB. If this ever changes we should handle | 537 | * Number of entries in the SLB. If this ever changes we should handle |
513 | * it with a use a cpu feature fixup. | 538 | * it with a use a cpu feature fixup. |