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 57703994a063..c225cf154bfe 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -888,3 +888,35 @@ void dump_stack(void)
888 show_stack(current, NULL); 888 show_stack(current, NULL);
889} 889}
890EXPORT_SYMBOL(dump_stack); 890EXPORT_SYMBOL(dump_stack);
891
892#ifdef CONFIG_PPC64
893void ppc64_runlatch_on(void)
894{
895 unsigned long ctrl;
896
897 if (cpu_has_feature(CPU_FTR_CTRL) && !test_thread_flag(TIF_RUNLATCH)) {
898 HMT_medium();
899
900 ctrl = mfspr(SPRN_CTRLF);
901 ctrl |= CTRL_RUNLATCH;
902 mtspr(SPRN_CTRLT, ctrl);
903
904 set_thread_flag(TIF_RUNLATCH);
905 }
906}
907
908void ppc64_runlatch_off(void)
909{
910 unsigned long ctrl;
911
912 if (cpu_has_feature(CPU_FTR_CTRL) && test_thread_flag(TIF_RUNLATCH)) {
913 HMT_medium();
914
915 clear_thread_flag(TIF_RUNLATCH);
916
917 ctrl = mfspr(SPRN_CTRLF);
918 ctrl &= ~CTRL_RUNLATCH;
919 mtspr(SPRN_CTRLT, ctrl);
920 }
921}
922#endif