[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
@ -583,6 +583,20 @@ static void __init check_cpu_pa_features(unsigned long node)
|
||||
ibm_pa_features, ARRAY_SIZE(ibm_pa_features));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
static void __init check_cpu_slb_size(unsigned long node)
|
||||
{
|
||||
u32 *slb_size_ptr;
|
||||
|
||||
slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL);
|
||||
if (slb_size_ptr != NULL) {
|
||||
mmu_slb_size = *slb_size_ptr;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define check_cpu_slb_size(node) do { } while(0)
|
||||
#endif
|
||||
|
||||
static struct feature_property {
|
||||
const char *name;
|
||||
u32 min_value;
|
||||
@ -713,6 +727,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
|
||||
|
||||
check_cpu_feature_properties(node);
|
||||
check_cpu_pa_features(node);
|
||||
check_cpu_slb_size(node);
|
||||
|
||||
#ifdef CONFIG_PPC_PSERIES
|
||||
if (nthreads > 1)
|
||||
|
Reference in New Issue
Block a user