diff options
Diffstat (limited to 'include/asm-ppc64/processor.h')
-rw-r--r-- | include/asm-ppc64/processor.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index 5ba6aa45e1e2..809c634ba1df 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h | |||
@@ -164,6 +164,9 @@ | |||
164 | #define SPRN_USIA 0x3AB /* User Sampled Instruction Address Register */ | 164 | #define SPRN_USIA 0x3AB /* User Sampled Instruction Address Register */ |
165 | #define SPRN_XER 0x001 /* Fixed Point Exception Register */ | 165 | #define SPRN_XER 0x001 /* Fixed Point Exception Register */ |
166 | #define SPRN_VRSAVE 0x100 /* Vector save */ | 166 | #define SPRN_VRSAVE 0x100 /* Vector save */ |
167 | #define SPRN_CTRLF 0x088 | ||
168 | #define SPRN_CTRLT 0x098 | ||
169 | #define CTRL_RUNLATCH 0x1 | ||
167 | 170 | ||
168 | /* Performance monitor SPRs */ | 171 | /* Performance monitor SPRs */ |
169 | #define SPRN_SIAR 780 | 172 | #define SPRN_SIAR 780 |
@@ -279,12 +282,6 @@ | |||
279 | #define XGLUE(a,b) a##b | 282 | #define XGLUE(a,b) a##b |
280 | #define GLUE(a,b) XGLUE(a,b) | 283 | #define GLUE(a,b) XGLUE(a,b) |
281 | 284 | ||
282 | /* iSeries CTRL register (for runlatch) */ | ||
283 | |||
284 | #define CTRLT 0x098 | ||
285 | #define CTRLF 0x088 | ||
286 | #define RUNLATCH 0x0001 | ||
287 | |||
288 | #ifdef __ASSEMBLY__ | 285 | #ifdef __ASSEMBLY__ |
289 | 286 | ||
290 | #define _GLOBAL(name) \ | 287 | #define _GLOBAL(name) \ |
@@ -499,6 +496,24 @@ static inline void prefetchw(const void *x) | |||
499 | 496 | ||
500 | #define HAVE_ARCH_PICK_MMAP_LAYOUT | 497 | #define HAVE_ARCH_PICK_MMAP_LAYOUT |
501 | 498 | ||
499 | static inline void ppc64_runlatch_on(void) | ||
500 | { | ||
501 | unsigned long ctrl; | ||
502 | |||
503 | ctrl = mfspr(SPRN_CTRLF); | ||
504 | ctrl |= CTRL_RUNLATCH; | ||
505 | mtspr(SPRN_CTRLT, ctrl); | ||
506 | } | ||
507 | |||
508 | static inline void ppc64_runlatch_off(void) | ||
509 | { | ||
510 | unsigned long ctrl; | ||
511 | |||
512 | ctrl = mfspr(SPRN_CTRLF); | ||
513 | ctrl &= ~CTRL_RUNLATCH; | ||
514 | mtspr(SPRN_CTRLT, ctrl); | ||
515 | } | ||
516 | |||
502 | #endif /* __KERNEL__ */ | 517 | #endif /* __KERNEL__ */ |
503 | 518 | ||
504 | #endif /* __ASSEMBLY__ */ | 519 | #endif /* __ASSEMBLY__ */ |