[POWERPC] Use SLB size from the device tree
Currently we hardwire the number of SLBs to 64, but PAPR says we should use the ibm,slb-size property to obtain the number of SLB entries. This uses this property instead of assuming 64. If no property is found, we assume 64 entries as before. This soft patches the SLB handler, so it shouldn't change performance at all. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
44ef339073
commit
584f8b71a2
@@ -256,6 +256,7 @@ void slb_initialize(void)
|
||||
static int slb_encoding_inited;
|
||||
extern unsigned int *slb_miss_kernel_load_linear;
|
||||
extern unsigned int *slb_miss_kernel_load_io;
|
||||
extern unsigned int *slb_compare_rr_to_size;
|
||||
|
||||
/* Prepare our SLB miss handler based on our page size */
|
||||
linear_llp = mmu_psize_defs[mmu_linear_psize].sllp;
|
||||
@@ -269,6 +270,8 @@ void slb_initialize(void)
|
||||
SLB_VSID_KERNEL | linear_llp);
|
||||
patch_slb_encoding(slb_miss_kernel_load_io,
|
||||
SLB_VSID_KERNEL | io_llp);
|
||||
patch_slb_encoding(slb_compare_rr_to_size,
|
||||
mmu_slb_size);
|
||||
|
||||
DBG("SLB: linear LLP = %04x\n", linear_llp);
|
||||
DBG("SLB: io LLP = %04x\n", io_llp);
|
||||
|
Reference in New Issue
Block a user