aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r--arch/powerpc/kernel/setup-common.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 499c3861074f..0af3fc1bdcc9 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -304,19 +304,21 @@ struct seq_operations cpuinfo_op = {
304void __init check_for_initrd(void) 304void __init check_for_initrd(void)
305{ 305{
306#ifdef CONFIG_BLK_DEV_INITRD 306#ifdef CONFIG_BLK_DEV_INITRD
307 unsigned long *prop; 307 const unsigned int *prop;
308 int len;
308 309
309 DBG(" -> check_for_initrd()\n"); 310 DBG(" -> check_for_initrd()\n");
310 311
311 if (of_chosen) { 312 if (of_chosen) {
312 prop = (unsigned long *)get_property(of_chosen, 313 prop = get_property(of_chosen, "linux,initrd-start", &len);
313 "linux,initrd-start", NULL);
314 if (prop != NULL) { 314 if (prop != NULL) {
315 initrd_start = (unsigned long)__va(*prop); 315 initrd_start = (unsigned long)
316 prop = (unsigned long *)get_property(of_chosen, 316 __va(of_read_ulong(prop, len / 4));
317 "linux,initrd-end", NULL); 317 prop = get_property(of_chosen,
318 "linux,initrd-end", &len);
318 if (prop != NULL) { 319 if (prop != NULL) {
319 initrd_end = (unsigned long)__va(*prop); 320 initrd_end = (unsigned long)
321 __va(of_read_ulong(prop, len / 4));
320 initrd_below_start_ok = 1; 322 initrd_below_start_ok = 1;
321 } else 323 } else
322 initrd_start = 0; 324 initrd_start = 0;
@@ -366,15 +368,14 @@ void __init smp_setup_cpu_maps(void)
366 int cpu = 0; 368 int cpu = 0;
367 369
368 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) { 370 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) {
369 int *intserv; 371 const int *intserv;
370 int j, len = sizeof(u32), nthreads = 1; 372 int j, len = sizeof(u32), nthreads = 1;
371 373
372 intserv = (int *)get_property(dn, "ibm,ppc-interrupt-server#s", 374 intserv = get_property(dn, "ibm,ppc-interrupt-server#s", &len);
373 &len);
374 if (intserv) 375 if (intserv)
375 nthreads = len / sizeof(int); 376 nthreads = len / sizeof(int);
376 else { 377 else {
377 intserv = (int *) get_property(dn, "reg", NULL); 378 intserv = get_property(dn, "reg", NULL);
378 if (!intserv) 379 if (!intserv)
379 intserv = &cpu; /* assume logical == phys */ 380 intserv = &cpu; /* assume logical == phys */
380 } 381 }
@@ -395,13 +396,12 @@ void __init smp_setup_cpu_maps(void)
395 if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR) && 396 if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR) &&
396 (dn = of_find_node_by_path("/rtas"))) { 397 (dn = of_find_node_by_path("/rtas"))) {
397 int num_addr_cell, num_size_cell, maxcpus; 398 int num_addr_cell, num_size_cell, maxcpus;
398 unsigned int *ireg; 399 const unsigned int *ireg;
399 400
400 num_addr_cell = prom_n_addr_cells(dn); 401 num_addr_cell = prom_n_addr_cells(dn);
401 num_size_cell = prom_n_size_cells(dn); 402 num_size_cell = prom_n_size_cells(dn);
402 403
403 ireg = (unsigned int *) 404 ireg = get_property(dn, "ibm,lrdr-capacity", NULL);
404 get_property(dn, "ibm,lrdr-capacity", NULL);
405 405
406 if (!ireg) 406 if (!ireg)
407 goto out; 407 goto out;
@@ -444,6 +444,8 @@ void __init smp_setup_cpu_maps(void)
444 444
445int __initdata do_early_xmon; 445int __initdata do_early_xmon;
446#ifdef CONFIG_XMON 446#ifdef CONFIG_XMON
447extern int xmon_no_auto_backtrace;
448
447static int __init early_xmon(char *p) 449static int __init early_xmon(char *p)
448{ 450{
449 /* ensure xmon is enabled */ 451 /* ensure xmon is enabled */
@@ -452,6 +454,8 @@ static int __init early_xmon(char *p)
452 xmon_init(1); 454 xmon_init(1);
453 if (strncmp(p, "off", 3) == 0) 455 if (strncmp(p, "off", 3) == 0)
454 xmon_init(0); 456 xmon_init(0);
457 if (strncmp(p, "nobt", 4) == 0)
458 xmon_no_auto_backtrace = 1;
455 if (strncmp(p, "early", 5) != 0) 459 if (strncmp(p, "early", 5) != 0)
456 return 0; 460 return 0;
457 } 461 }