powerpc/64: Move setting of {i,d}cache_bsize to initialize_cache_info()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 5 Jul 2016 05:04:08 +0000 (15:04 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 21 Jul 2016 09:08:06 +0000 (19:08 +1000)
Also remove the completely osbolete comment. We *do* look in the
device-tree.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/setup_64.c

index 2395a88b11424551aea6ae4ea66aebd8e5a5189d..aca215d77fe36b516e16ae0ba9337f10864ef841 100644 (file)
@@ -473,6 +473,10 @@ static void __init initialize_cache_info(void)
                }
        }
 
+       /* For use by binfmt_elf */
+       dcache_bsize = ppc64_caches.dline_size;
+       icache_bsize = ppc64_caches.iline_size;
+
        DBG(" <- initialize_cache_info()\n");
 }
 
@@ -691,15 +695,6 @@ void __init setup_arch(char **cmdline_p)
 {
        *cmdline_p = boot_command_line;
 
-       /*
-        * 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 = ppc64_caches.dline_size;
-       icache_bsize = ppc64_caches.iline_size;
-
-
        /* Reserve large chunks of memory for use by CMA for KVM */
        kvm_cma_reserve();