diff options
Diffstat (limited to 'arch/ppc64/kernel/setup.c')
-rw-r--r-- | arch/ppc64/kernel/setup.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index 687e85595208..ee3b20de2e7a 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c | |||
@@ -536,15 +536,19 @@ static void __init check_for_initrd(void) | |||
536 | 536 | ||
537 | DBG(" -> check_for_initrd()\n"); | 537 | DBG(" -> check_for_initrd()\n"); |
538 | 538 | ||
539 | prop = (u64 *)get_property(of_chosen, "linux,initrd-start", NULL); | 539 | if (of_chosen) { |
540 | if (prop != NULL) { | 540 | prop = (u64 *)get_property(of_chosen, |
541 | initrd_start = (unsigned long)__va(*prop); | 541 | "linux,initrd-start", NULL); |
542 | prop = (u64 *)get_property(of_chosen, "linux,initrd-end", NULL); | ||
543 | if (prop != NULL) { | 542 | if (prop != NULL) { |
544 | initrd_end = (unsigned long)__va(*prop); | 543 | initrd_start = (unsigned long)__va(*prop); |
545 | initrd_below_start_ok = 1; | 544 | prop = (u64 *)get_property(of_chosen, |
546 | } else | 545 | "linux,initrd-end", NULL); |
547 | initrd_start = 0; | 546 | if (prop != NULL) { |
547 | initrd_end = (unsigned long)__va(*prop); | ||
548 | initrd_below_start_ok = 1; | ||
549 | } else | ||
550 | initrd_start = 0; | ||
551 | } | ||
548 | } | 552 | } |
549 | 553 | ||
550 | /* If we were passed an initrd, set the ROOT_DEV properly if the values | 554 | /* If we were passed an initrd, set the ROOT_DEV properly if the values |
@@ -627,7 +631,7 @@ void __init setup_system(void) | |||
627 | * Initialize xmon | 631 | * Initialize xmon |
628 | */ | 632 | */ |
629 | #ifdef CONFIG_XMON_DEFAULT | 633 | #ifdef CONFIG_XMON_DEFAULT |
630 | xmon_init(); | 634 | xmon_init(1); |
631 | #endif | 635 | #endif |
632 | /* | 636 | /* |
633 | * Register early console | 637 | * Register early console |
@@ -706,6 +710,8 @@ void machine_power_off(void) | |||
706 | local_irq_disable(); | 710 | local_irq_disable(); |
707 | while (1) ; | 711 | while (1) ; |
708 | } | 712 | } |
713 | /* Used by the G5 thermal driver */ | ||
714 | EXPORT_SYMBOL_GPL(machine_power_off); | ||
709 | 715 | ||
710 | void machine_halt(void) | 716 | void machine_halt(void) |
711 | { | 717 | { |
@@ -1341,11 +1347,13 @@ static int __init early_xmon(char *p) | |||
1341 | /* ensure xmon is enabled */ | 1347 | /* ensure xmon is enabled */ |
1342 | if (p) { | 1348 | if (p) { |
1343 | if (strncmp(p, "on", 2) == 0) | 1349 | if (strncmp(p, "on", 2) == 0) |
1344 | xmon_init(); | 1350 | xmon_init(1); |
1351 | if (strncmp(p, "off", 3) == 0) | ||
1352 | xmon_init(0); | ||
1345 | if (strncmp(p, "early", 5) != 0) | 1353 | if (strncmp(p, "early", 5) != 0) |
1346 | return 0; | 1354 | return 0; |
1347 | } | 1355 | } |
1348 | xmon_init(); | 1356 | xmon_init(1); |
1349 | debugger(NULL); | 1357 | debugger(NULL); |
1350 | 1358 | ||
1351 | return 0; | 1359 | return 0; |