Commit b68b1d74 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/64s/radix: Do not allocate SLB shadow structures

These are unused in radix mode.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d5507190
...@@ -99,18 +99,27 @@ static inline void free_lppacas(void) { } ...@@ -99,18 +99,27 @@ static inline void free_lppacas(void) { }
* If you make the number of persistent SLB entries dynamic, please also * If you make the number of persistent SLB entries dynamic, please also
* update PR KVM to flush and restore them accordingly. * update PR KVM to flush and restore them accordingly.
*/ */
static struct slb_shadow *slb_shadow; static struct slb_shadow * __initdata slb_shadow;
static void __init allocate_slb_shadows(int nr_cpus, int limit) static void __init allocate_slb_shadows(int nr_cpus, int limit)
{ {
int size = PAGE_ALIGN(sizeof(struct slb_shadow) * nr_cpus); int size = PAGE_ALIGN(sizeof(struct slb_shadow) * nr_cpus);
if (early_radix_enabled())
return;
slb_shadow = __va(memblock_alloc_base(size, PAGE_SIZE, limit)); slb_shadow = __va(memblock_alloc_base(size, PAGE_SIZE, limit));
memset(slb_shadow, 0, size); memset(slb_shadow, 0, size);
} }
static struct slb_shadow * __init init_slb_shadow(int cpu) static struct slb_shadow * __init init_slb_shadow(int cpu)
{ {
struct slb_shadow *s = &slb_shadow[cpu]; struct slb_shadow *s;
if (early_radix_enabled())
return NULL;
s = &slb_shadow[cpu];
/* /*
* When we come through here to initialise boot_paca, the slb_shadow * When we come through here to initialise boot_paca, the slb_shadow
......
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