Skip to content

Commit

Permalink
powerpc/64: Setup KUP on secondary CPUs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell Currey authored and Michael Ellerman committed Apr 21, 2019
1 parent de78a9c commit b28c975
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/mm/init-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b28c975

Please sign in to comment.