aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-22 15:48:03 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-22 15:48:03 -0400
commit14d1adfc59ba66932ef167fdff62983e7c2b0197 (patch)
tree34bad21bf4ec220be87fa5d79ff41dd98e7dad9f /arch/powerpc/kernel/setup-common.c
parente478bec0ba0a83a48a0f6982934b6de079e7e6b3 (diff)
parent69917c26c840e7de94522bf90fb190de63bf92bd (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (114 commits) [POWERPC] Fix ohare IDE irq workaround on old powermacs [POWERPC] EEH: Power4 systems sometimes need multiple resets. [POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t. [POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c [POWERPC] Maple U3 HT - reject inappropriate config space access [POWERPC] Fix IPIC pending register assignments [POWERPC] powerpc: fix building gdb against asm/ptrace.h [POWERPC] Remove DISCONTIGMEM cruft from page.h [POWERPC] Merge iSeries i/o operations with the rest [POWERPC] 40x: Fix debug status register defines [POWERPC] Fix compile error in sbc8560 [POWERPC] EEH: support MMIO enable recovery step [POWERPC] EEH: enable MMIO/DMA on frozen slot [POWERPC] EEH: code comment cleanup [POWERPC] EEH: balance pcidev_get/put calls [POWERPC] PPC: Fix xmon stack frame address in backtrace [POWERPC] Add AT_PLATFORM value for Xilinx Virtex-4 FX [POWERPC] Start arch/powerpc/boot code reorganization [POWERPC] Define of_read_ulong helper [POWERPC] iseries: eliminate a couple of warnings ...
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 }