aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c32
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}
888EXPORT_SYMBOL(dump_stack); 888EXPORT_SYMBOL(dump_stack);
889
890#ifdef CONFIG_PPC64
891void 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
906void 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