hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/powerpc/include/asm/switch_to.h
....@@ -5,6 +5,7 @@
55 #ifndef _ASM_POWERPC_SWITCH_TO_H
66 #define _ASM_POWERPC_SWITCH_TO_H
77
8
+#include <linux/sched.h>
89 #include <asm/reg.h>
910
1011 struct thread_struct;
....@@ -21,6 +22,16 @@
2122 extern void switch_booke_debug_regs(struct debug_reg *new_debug);
2223
2324 extern int emulate_altivec(struct pt_regs *);
25
+
26
+#ifdef CONFIG_PPC_BOOK3S_64
27
+void restore_math(struct pt_regs *regs);
28
+#else
29
+static inline void restore_math(struct pt_regs *regs)
30
+{
31
+}
32
+#endif
33
+
34
+void restore_tm_state(struct pt_regs *regs);
2435
2536 extern void flush_all_to_thread(struct task_struct *);
2637 extern void giveup_all(struct task_struct *);
....@@ -60,6 +71,16 @@
6071 {
6172 msr_check_and_clear(MSR_FP|MSR_VEC|MSR_VSX);
6273 }
74
+#else
75
+static inline void enable_kernel_vsx(void)
76
+{
77
+ BUILD_BUG();
78
+}
79
+
80
+static inline void disable_kernel_vsx(void)
81
+{
82
+ BUILD_BUG();
83
+}
6384 #endif
6485
6586 #ifdef CONFIG_SPE
....@@ -90,8 +111,6 @@
90111 t->thread.used_ebb = 0;
91112 #endif
92113 }
93
-
94
-extern int set_thread_uses_vas(void);
95114
96115 extern int set_thread_tidr(struct task_struct *t);
97116