]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/powerpc/kernel/process.c
Merge tag 'powerpc-4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[mirror_ubuntu-zesty-kernel.git] / arch / powerpc / kernel / process.c
index 49a680d5ae3740041b8819095d3815dda4930417..04885cec24df1413f90121115cf6569e4aa444e6 100644 (file)
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
 
+#ifdef CONFIG_CC_STACKPROTECTOR
+#include <linux/stackprotector.h>
+unsigned long __stack_chk_guard __read_mostly;
+EXPORT_SYMBOL(__stack_chk_guard);
+#endif
+
 /* Transactional Memory debug */
 #ifdef TM_DEBUG_SW
 #define TM_DEBUG(x...) printk(KERN_INFO x)
@@ -1051,14 +1057,6 @@ static inline void save_sprs(struct thread_struct *t)
                 */
                t->tar = mfspr(SPRN_TAR);
        }
-
-       if (cpu_has_feature(CPU_FTR_ARCH_300)) {
-               /* Conditionally save Load Monitor registers, if enabled */
-               if (t->fscr & FSCR_LM) {
-                       t->lmrr = mfspr(SPRN_LMRR);
-                       t->lmser = mfspr(SPRN_LMSER);
-               }
-       }
 #endif
 }
 
@@ -1094,16 +1092,6 @@ static inline void restore_sprs(struct thread_struct *old_thread,
                if (old_thread->tar != new_thread->tar)
                        mtspr(SPRN_TAR, new_thread->tar);
        }
-
-       if (cpu_has_feature(CPU_FTR_ARCH_300)) {
-               /* Conditionally restore Load Monitor registers, if enabled */
-               if (new_thread->fscr & FSCR_LM) {
-                       if (old_thread->lmrr != new_thread->lmrr)
-                               mtspr(SPRN_LMRR, new_thread->lmrr);
-                       if (old_thread->lmser != new_thread->lmser)
-                               mtspr(SPRN_LMSER, new_thread->lmser);
-               }
-       }
 #endif
 }