Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Make slb_shadow a local

The only external user of slb_shadow is the pseries lpar code, and it
can access through the paca array instead.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Jeremy Kerr and committed by
Benjamin Herrenschmidt
1a8f6f97 d317ac17

+2 -4
-2
arch/powerpc/include/asm/lppaca.h
··· 132 132 } save_area[SLB_NUM_BOLTED]; 133 133 } ____cacheline_aligned; 134 134 135 - extern struct slb_shadow slb_shadow[]; 136 - 137 135 /* 138 136 * Layout of entries in the hypervisor's dispatch trace log buffer. 139 137 */
+1 -1
arch/powerpc/kernel/paca.c
··· 99 99 * 3 persistent SLBs are registered here. The buffer will be zero 100 100 * initially, hence will all be invaild until we actually write them. 101 101 */ 102 - struct slb_shadow slb_shadow[] __cacheline_aligned = { 102 + static struct slb_shadow slb_shadow[] __cacheline_aligned = { 103 103 [0 ... (NR_CPUS-1)] = { 104 104 .persistent = cpu_to_be32(SLB_NUM_BOLTED), 105 105 .buffer_length = cpu_to_be32(sizeof(struct slb_shadow)),
+1 -1
arch/powerpc/platforms/pseries/lpar.c
··· 92 92 * PAPR says this feature is SLB-Buffer but firmware never 93 93 * reports that. All SPLPAR support SLB shadow buffer. 94 94 */ 95 - addr = __pa(&slb_shadow[cpu]); 95 + addr = __pa(paca[cpu].slb_shadow_ptr); 96 96 if (firmware_has_feature(FW_FEATURE_SPLPAR)) { 97 97 ret = register_slb_shadow(hwcpu, addr); 98 98 if (ret)