diff options
Diffstat (limited to 'include/asm-powerpc/reg.h')
-rw-r--r-- | include/asm-powerpc/reg.h | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 12ecc9b9f285..72bfe3af0460 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -615,27 +615,9 @@ | |||
615 | #define proc_trap() asm volatile("trap") | 615 | #define proc_trap() asm volatile("trap") |
616 | 616 | ||
617 | #ifdef CONFIG_PPC64 | 617 | #ifdef CONFIG_PPC64 |
618 | static inline void ppc64_runlatch_on(void) | 618 | |
619 | { | 619 | extern void ppc64_runlatch_on(void); |
620 | unsigned long ctrl; | 620 | extern void ppc64_runlatch_off(void); |
621 | |||
622 | if (cpu_has_feature(CPU_FTR_CTRL)) { | ||
623 | ctrl = mfspr(SPRN_CTRLF); | ||
624 | ctrl |= CTRL_RUNLATCH; | ||
625 | mtspr(SPRN_CTRLT, ctrl); | ||
626 | } | ||
627 | } | ||
628 | |||
629 | static inline void ppc64_runlatch_off(void) | ||
630 | { | ||
631 | unsigned long ctrl; | ||
632 | |||
633 | if (cpu_has_feature(CPU_FTR_CTRL)) { | ||
634 | ctrl = mfspr(SPRN_CTRLF); | ||
635 | ctrl &= ~CTRL_RUNLATCH; | ||
636 | mtspr(SPRN_CTRLT, ctrl); | ||
637 | } | ||
638 | } | ||
639 | 621 | ||
640 | extern unsigned long scom970_read(unsigned int address); | 622 | extern unsigned long scom970_read(unsigned int address); |
641 | extern void scom970_write(unsigned int address, unsigned long value); | 623 | extern void scom970_write(unsigned int address, unsigned long value); |
@@ -645,15 +627,6 @@ extern void scom970_write(unsigned int address, unsigned long value); | |||
645 | #define __get_SP() ({unsigned long sp; \ | 627 | #define __get_SP() ({unsigned long sp; \ |
646 | asm volatile("mr %0,1": "=r" (sp)); sp;}) | 628 | asm volatile("mr %0,1": "=r" (sp)); sp;}) |
647 | 629 | ||
648 | #else /* __ASSEMBLY__ */ | ||
649 | |||
650 | #define RUNLATCH_ON(REG) \ | ||
651 | BEGIN_FTR_SECTION \ | ||
652 | mfspr (REG),SPRN_CTRLF; \ | ||
653 | ori (REG),(REG),CTRL_RUNLATCH; \ | ||
654 | mtspr SPRN_CTRLT,(REG); \ | ||
655 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) | ||
656 | |||
657 | #endif /* __ASSEMBLY__ */ | 630 | #endif /* __ASSEMBLY__ */ |
658 | #endif /* __KERNEL__ */ | 631 | #endif /* __KERNEL__ */ |
659 | #endif /* _ASM_POWERPC_REG_H */ | 632 | #endif /* _ASM_POWERPC_REG_H */ |