summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/switch_to.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-08-14 12:14:12 +0200
committerIngo Molnar <mingo@kernel.org>2013-08-14 12:14:12 +0200
commit397f09977ea350a20f20b415a9313cc790137742 (patch)
tree0e44f2f3e5804bd5c0c6f644785006b7225e3c94 /arch/powerpc/include/asm/switch_to.h
parent6356bb0ad6525dae93c06478a098ed3848e9ab01 (diff)
parenta4b4bedce880046feeb5b206392960f395ed02ad (diff)
downloadop-kernel-dev-397f09977ea350a20f20b415a9313cc790137742.zip
op-kernel-dev-397f09977ea350a20f20b415a9313cc790137742.tar.gz
Merge tag 'amd_f15_m30' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/ras
Pull AMD F15h, model 0x30 and later enablement stuff, more specifically EDAC support, from Borislav Petkov. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/powerpc/include/asm/switch_to.h')
-rw-r--r--arch/powerpc/include/asm/switch_to.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h
index 49a13e0..294c2ce 100644
--- a/arch/powerpc/include/asm/switch_to.h
+++ b/arch/powerpc/include/asm/switch_to.h
@@ -15,6 +15,15 @@ extern struct task_struct *__switch_to(struct task_struct *,
struct thread_struct;
extern struct task_struct *_switch(struct thread_struct *prev,
struct thread_struct *next);
+#ifdef CONFIG_PPC_BOOK3S_64
+static inline void save_tar(struct thread_struct *prev)
+{
+ if (cpu_has_feature(CPU_FTR_ARCH_207S))
+ prev->tar = mfspr(SPRN_TAR);
+}
+#else
+static inline void save_tar(struct thread_struct *prev) {}
+#endif
extern void giveup_fpu(struct task_struct *);
extern void load_up_fpu(void);
OpenPOWER on IntegriCloud