diff options
author | Paul Mackerras <paulus@samba.org> | 2006-02-23 22:05:47 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-23 22:05:47 -0500 |
commit | a00428f5b149e36b8225b2a0812742a6dfb07b8c (patch) | |
tree | a78869cd67cf78a0eb091fb0ea5d397734bd6738 /arch/powerpc/kernel/process.c | |
parent | 774fee58c465ea1c7e9775e347ec307bcf2deeb3 (diff) | |
parent | fb5c594c2acc441f0d2d8f457484a0e0e9285db3 (diff) |
Merge ../powerpc-merge
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 1201880cab40..dd774c3c9302 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -886,3 +886,35 @@ void dump_stack(void) | |||
886 | show_stack(current, NULL); | 886 | show_stack(current, NULL); |
887 | } | 887 | } |
888 | EXPORT_SYMBOL(dump_stack); | 888 | EXPORT_SYMBOL(dump_stack); |
889 | |||
890 | #ifdef CONFIG_PPC64 | ||
891 | void ppc64_runlatch_on(void) | ||
892 | { | ||
893 | unsigned long ctrl; | ||
894 | |||
895 | if (cpu_has_feature(CPU_FTR_CTRL) && !test_thread_flag(TIF_RUNLATCH)) { | ||
896 | HMT_medium(); | ||
897 | |||
898 | ctrl = mfspr(SPRN_CTRLF); | ||
899 | ctrl |= CTRL_RUNLATCH; | ||
900 | mtspr(SPRN_CTRLT, ctrl); | ||
901 | |||
902 | set_thread_flag(TIF_RUNLATCH); | ||
903 | } | ||
904 | } | ||
905 | |||
906 | void ppc64_runlatch_off(void) | ||
907 | { | ||
908 | unsigned long ctrl; | ||
909 | |||
910 | if (cpu_has_feature(CPU_FTR_CTRL) && test_thread_flag(TIF_RUNLATCH)) { | ||
911 | HMT_medium(); | ||
912 | |||
913 | clear_thread_flag(TIF_RUNLATCH); | ||
914 | |||
915 | ctrl = mfspr(SPRN_CTRLF); | ||
916 | ctrl &= ~CTRL_RUNLATCH; | ||
917 | mtspr(SPRN_CTRLT, ctrl); | ||
918 | } | ||
919 | } | ||
920 | #endif | ||