]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - arch/arm/kernel/process.c
Merge branch '4.0.8-rt6'
[zynq/linux.git] / arch / arm / kernel / process.c
index fdfa3a78ec8cb8d7c96098f58175eea28e8a6da5..cbf61b185e842ad8bbc9d575732d32d011357f03 100644 (file)
@@ -41,6 +41,7 @@
 #include <asm/system_misc.h>
 #include <asm/mach/time.h>
 #include <asm/tls.h>
+#include "reboot.h"
 
 #ifdef CONFIG_CC_STACKPROTECTOR
 #include <linux/stackprotector.h>
@@ -95,7 +96,7 @@ static void __soft_restart(void *addr)
        BUG();
 }
 
-void soft_restart(unsigned long addr)
+void _soft_restart(unsigned long addr, bool disable_l2)
 {
        u64 *stack = soft_restart_stack + ARRAY_SIZE(soft_restart_stack);
 
@@ -104,7 +105,7 @@ void soft_restart(unsigned long addr)
        local_fiq_disable();
 
        /* Disable the L2 if we're the last man standing. */
-       if (num_online_cpus() == 1)
+       if (disable_l2)
                outer_disable();
 
        /* Change to the new stack and continue with the reset. */
@@ -114,6 +115,11 @@ void soft_restart(unsigned long addr)
        BUG();
 }
 
+void soft_restart(unsigned long addr)
+{
+       _soft_restart(addr, num_online_cpus() == 1);
+}
+
 /*
  * Function pointers to optional machine specific functions
  */
@@ -178,6 +184,9 @@ void arch_cpu_idle_dead(void)
 void machine_shutdown(void)
 {
        disable_nonboot_cpus();
+#ifdef CONFIG_SMP
+       smp_send_stop();
+#endif
 }
 
 /*
@@ -431,6 +440,30 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
 }
 
 #ifdef CONFIG_MMU
+/*
+ * CONFIG_SPLIT_PTLOCK_CPUS results in a page->ptl lock.  If the lock is not
+ * initialized by pgtable_page_ctor() then a coredump of the vector page will
+ * fail.
+ */
+static int __init vectors_user_mapping_init_page(void)
+{
+       struct page *page;
+       unsigned long addr = 0xffff0000;
+       pgd_t *pgd;
+       pud_t *pud;
+       pmd_t *pmd;
+
+       pgd = pgd_offset_k(addr);
+       pud = pud_offset(pgd, addr);
+       pmd = pmd_offset(pud, addr);
+       page = pmd_page(*(pmd));
+
+       pgtable_page_ctor(page);
+
+       return 0;
+}
+late_initcall(vectors_user_mapping_init_page);
+
 #ifdef CONFIG_KUSER_HELPERS
 /*
  * The vectors page is always readable from user space for the