Commit b28c9750 authored by Russell Currey's avatar Russell Currey Committed by Michael Ellerman

powerpc/64: Setup KUP on secondary CPUs

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: default avatarRussell Currey <ruscur@russell.cc>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent de78a9c4
...@@ -390,6 +390,9 @@ void early_setup_secondary(void) ...@@ -390,6 +390,9 @@ void early_setup_secondary(void)
/* Initialize the hash table or TLB handling */ /* Initialize the hash table or TLB handling */
early_init_mmu_secondary(); 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 * At this point, we can let interrupts switch to virtual mode
* (the MMU has been setup), so adjust the MSR in the PACA to * (the MMU has been setup), so adjust the MSR in the PACA to
......
...@@ -45,7 +45,7 @@ static int __init parse_nosmap(char *p) ...@@ -45,7 +45,7 @@ static int __init parse_nosmap(char *p)
} }
early_param("nosmap", parse_nosmap); early_param("nosmap", parse_nosmap);
void __init setup_kup(void) void setup_kup(void)
{ {
setup_kuep(disable_kuep); setup_kuep(disable_kuep);
setup_kuap(disable_kuap); setup_kuap(disable_kuap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment