powerpc/64: Setup KUP on secondary CPUs
authorRussell Currey <ruscur@russell.cc>
Thu, 18 Apr 2019 06:51:21 +0000 (16:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 21 Apr 2019 13:05:59 +0000 (23:05 +1000)
Some platforms (i.e. Radix MMU) need per-CPU initialisation for KUP.

Any platforms that only want to do KUP initialisation once
globally can just check to see if they're running on the boot CPU, or
check if whatever setup they need has already been performed.

Note that this is only for 64-bit.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/setup_64.c
arch/powerpc/mm/init-common.c

index 6179c42003399e47023a5c001c25c5e66db0282d..684e34493bf5a086c06b8814781deaa6dbb96431 100644 (file)
@@ -390,6 +390,9 @@ void early_setup_secondary(void)
        /* Initialize the hash table or TLB handling */
        early_init_mmu_secondary();
 
+       /* Perform any KUP setup that is per-cpu */
+       setup_kup();
+
        /*
         * At this point, we can let interrupts switch to virtual mode
         * (the MMU has been setup), so adjust the MSR in the PACA to
index ecaedfff99921d45f3ce82b9e94e1b0466f66ee4..6ea5607fc56467981cc76cd840d83dfe1a60026e 100644 (file)
@@ -45,7 +45,7 @@ static int __init parse_nosmap(char *p)
 }
 early_param("nosmap", parse_nosmap);
 
-void __init setup_kup(void)
+void setup_kup(void)
 {
        setup_kuep(disable_kuep);
        setup_kuap(disable_kuap);