aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r--arch/powerpc/kernel/setup_64.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index fd1785e4c9bb..00d6b8addd78 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -56,7 +56,6 @@
56#include <asm/page.h> 56#include <asm/page.h>
57#include <asm/mmu.h> 57#include <asm/mmu.h>
58#include <asm/lmb.h> 58#include <asm/lmb.h>
59#include <asm/iseries/it_lp_naca.h>
60#include <asm/firmware.h> 59#include <asm/firmware.h>
61#include <asm/xmon.h> 60#include <asm/xmon.h>
62#include <asm/udbg.h> 61#include <asm/udbg.h>
@@ -79,10 +78,10 @@ u64 ppc64_pft_size;
79 * before we've read this from the device tree. 78 * before we've read this from the device tree.
80 */ 79 */
81struct ppc64_caches ppc64_caches = { 80struct ppc64_caches ppc64_caches = {
82 .dline_size = 0x80, 81 .dline_size = 0x40,
83 .log_dline_size = 7, 82 .log_dline_size = 6,
84 .iline_size = 0x80, 83 .iline_size = 0x40,
85 .log_iline_size = 7 84 .log_iline_size = 6
86}; 85};
87EXPORT_SYMBOL_GPL(ppc64_caches); 86EXPORT_SYMBOL_GPL(ppc64_caches);
88 87
@@ -107,7 +106,7 @@ static int smt_enabled_cmdline;
107static void check_smt_enabled(void) 106static void check_smt_enabled(void)
108{ 107{
109 struct device_node *dn; 108 struct device_node *dn;
110 char *smt_option; 109 const char *smt_option;
111 110
112 /* Allow the command line to overrule the OF option */ 111 /* Allow the command line to overrule the OF option */
113 if (smt_enabled_cmdline) 112 if (smt_enabled_cmdline)
@@ -116,7 +115,7 @@ static void check_smt_enabled(void)
116 dn = of_find_node_by_path("/options"); 115 dn = of_find_node_by_path("/options");
117 116
118 if (dn) { 117 if (dn) {
119 smt_option = (char *)get_property(dn, "ibm,smt-enabled", NULL); 118 smt_option = get_property(dn, "ibm,smt-enabled", NULL);
120 119
121 if (smt_option) { 120 if (smt_option) {
122 if (!strcmp(smt_option, "on")) 121 if (!strcmp(smt_option, "on"))
@@ -293,7 +292,7 @@ static void __init initialize_cache_info(void)
293 */ 292 */
294 293
295 if ( num_cpus == 1 ) { 294 if ( num_cpus == 1 ) {
296 u32 *sizep, *lsizep; 295 const u32 *sizep, *lsizep;
297 u32 size, lsize; 296 u32 size, lsize;
298 const char *dc, *ic; 297 const char *dc, *ic;
299 298
@@ -308,10 +307,10 @@ static void __init initialize_cache_info(void)
308 307
309 size = 0; 308 size = 0;
310 lsize = cur_cpu_spec->dcache_bsize; 309 lsize = cur_cpu_spec->dcache_bsize;
311 sizep = (u32 *)get_property(np, "d-cache-size", NULL); 310 sizep = get_property(np, "d-cache-size", NULL);
312 if (sizep != NULL) 311 if (sizep != NULL)
313 size = *sizep; 312 size = *sizep;
314 lsizep = (u32 *) get_property(np, dc, NULL); 313 lsizep = get_property(np, dc, NULL);
315 if (lsizep != NULL) 314 if (lsizep != NULL)
316 lsize = *lsizep; 315 lsize = *lsizep;
317 if (sizep == 0 || lsizep == 0) 316 if (sizep == 0 || lsizep == 0)
@@ -325,10 +324,10 @@ static void __init initialize_cache_info(void)
325 324
326 size = 0; 325 size = 0;
327 lsize = cur_cpu_spec->icache_bsize; 326 lsize = cur_cpu_spec->icache_bsize;
328 sizep = (u32 *)get_property(np, "i-cache-size", NULL); 327 sizep = get_property(np, "i-cache-size", NULL);
329 if (sizep != NULL) 328 if (sizep != NULL)
330 size = *sizep; 329 size = *sizep;
331 lsizep = (u32 *)get_property(np, ic, NULL); 330 lsizep = get_property(np, ic, NULL);
332 if (lsizep != NULL) 331 if (lsizep != NULL)
333 lsize = *lsizep; 332 lsize = *lsizep;
334 if (sizep == 0 || lsizep == 0) 333 if (sizep == 0 || lsizep == 0)