aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_32.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-05 15:04:10 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-21 19:14:32 +1000
commit8f212cb26fc74dcf7b8c5c3dbcf3c3741990c31d (patch)
tree844293f86b7cc6a025f2ab0eccf82cbbe9075a17 /arch/powerpc/kernel/setup_32.c
parentpowerpc/64: Move the content of setup_system() to setup_arch() (diff)
downloadlinux-dev-8f212cb26fc74dcf7b8c5c3dbcf3c3741990c31d.tar.xz
linux-dev-8f212cb26fc74dcf7b8c5c3dbcf3c3741990c31d.zip
powerpc/32: Move cache info inits to a separate function
Matches 64-bit. Also move the call to the same spot as ppc64 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r--arch/powerpc/kernel/setup_32.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 22347e87c354..5457911d662d 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -248,6 +248,21 @@ static void setup_power_save(void)
#endif
}
+static __init void initialize_cache_info(void)
+{
+ /*
+ * Set cache line size based on type of cpu as a default.
+ * Systems with OF can look in the properties on the cpu node(s)
+ * for a possibly more accurate value.
+ */
+ dcache_bsize = cur_cpu_spec->dcache_bsize;
+ icache_bsize = cur_cpu_spec->icache_bsize;
+ ucache_bsize = 0;
+ if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
+ ucache_bsize = icache_bsize = dcache_bsize;
+}
+
+
/* Warning, IO base is not yet inited */
void __init setup_arch(char **cmdline_p)
{
@@ -257,6 +272,7 @@ void __init setup_arch(char **cmdline_p)
loops_per_jiffy = 500000000 / HZ;
unflatten_device_tree();
+ initialize_cache_info();
check_for_initrd();
probe_machine();
@@ -272,17 +288,6 @@ void __init setup_arch(char **cmdline_p)
xmon_setup();
- /*
- * Set cache line size based on type of cpu as a default.
- * Systems with OF can look in the properties on the cpu node(s)
- * for a possibly more accurate value.
- */
- dcache_bsize = cur_cpu_spec->dcache_bsize;
- icache_bsize = cur_cpu_spec->icache_bsize;
- ucache_bsize = 0;
- if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
- ucache_bsize = icache_bsize = dcache_bsize;
-
if (ppc_md.panic)
setup_panic();