summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/switch_to.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-27 09:03:30 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-27 09:03:30 +0400
commit3f1f4311881b330a7b5429dd101e676df191b159 (patch)
treea2533df8b157a7006c8c0cb2f89de32820135e50 /arch/powerpc/include/asm/switch_to.h
parent5935ff4343a689fbb382d64408bc6955c6589830 (diff)
parent28e61cc466d8daace4b0f04ba2b83e0bd68f5832 (diff)
downloadlinux-3f1f4311881b330a7b5429dd101e676df191b159.tar.xz
Merge branch 'merge' into next
Merge stuff that already went into Linus via "merge" which are pre-reqs for subsequent patches
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 2c7edde8f1bb..2be5618cdec6 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 load_up_fpu(void);
extern void enable_kernel_fp(void);