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.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index e22856ecb5a0..33e7f2c7f194 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -33,6 +33,7 @@
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/prom.h> 34#include <asm/prom.h>
35#include <asm/processor.h> 35#include <asm/processor.h>
36#include <asm/vdso_datapage.h>
36#include <asm/pgtable.h> 37#include <asm/pgtable.h>
37#include <asm/smp.h> 38#include <asm/smp.h>
38#include <asm/elf.h> 39#include <asm/elf.h>
@@ -51,6 +52,9 @@
51#include <asm/page.h> 52#include <asm/page.h>
52#include <asm/mmu.h> 53#include <asm/mmu.h>
53#include <asm/lmb.h> 54#include <asm/lmb.h>
55#include <asm/xmon.h>
56
57#include "setup.h"
54 58
55#undef DEBUG 59#undef DEBUG
56 60
@@ -60,6 +64,13 @@
60#define DBG(fmt...) 64#define DBG(fmt...)
61#endif 65#endif
62 66
67#ifdef CONFIG_PPC_MULTIPLATFORM
68int _machine = 0;
69EXPORT_SYMBOL(_machine);
70#endif
71
72unsigned long klimit = (unsigned long) _end;
73
63/* 74/*
64 * This still seems to be needed... -- paulus 75 * This still seems to be needed... -- paulus
65 */ 76 */
@@ -433,10 +444,8 @@ void __init check_for_initrd(void)
433 if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE && 444 if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE &&
434 initrd_end > initrd_start) 445 initrd_end > initrd_start)
435 ROOT_DEV = Root_RAM0; 446 ROOT_DEV = Root_RAM0;
436 else { 447 else
437 printk("Bogus initrd %08lx %08lx\n", initrd_start, initrd_end);
438 initrd_start = initrd_end = 0; 448 initrd_start = initrd_end = 0;
439 }
440 449
441 if (initrd_start) 450 if (initrd_start)
442 printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end); 451 printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
@@ -510,8 +519,8 @@ void __init smp_setup_cpu_maps(void)
510 * On pSeries LPAR, we need to know how many cpus 519 * On pSeries LPAR, we need to know how many cpus
511 * could possibly be added to this partition. 520 * could possibly be added to this partition.
512 */ 521 */
513 if (systemcfg->platform == PLATFORM_PSERIES_LPAR && 522 if (_machine == PLATFORM_PSERIES_LPAR &&
514 (dn = of_find_node_by_path("/rtas"))) { 523 (dn = of_find_node_by_path("/rtas"))) {
515 int num_addr_cell, num_size_cell, maxcpus; 524 int num_addr_cell, num_size_cell, maxcpus;
516 unsigned int *ireg; 525 unsigned int *ireg;
517 526
@@ -555,7 +564,27 @@ void __init smp_setup_cpu_maps(void)
555 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); 564 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]);
556 } 565 }
557 566
558 systemcfg->processorCount = num_present_cpus(); 567 vdso_data->processorCount = num_present_cpus();
559#endif /* CONFIG_PPC64 */ 568#endif /* CONFIG_PPC64 */
560} 569}
561#endif /* CONFIG_SMP */ 570#endif /* CONFIG_SMP */
571
572#ifdef CONFIG_XMON
573static int __init early_xmon(char *p)
574{
575 /* ensure xmon is enabled */
576 if (p) {
577 if (strncmp(p, "on", 2) == 0)
578 xmon_init(1);
579 if (strncmp(p, "off", 3) == 0)
580 xmon_init(0);
581 if (strncmp(p, "early", 5) != 0)
582 return 0;
583 }
584 xmon_init(1);
585 debugger(NULL);
586
587 return 0;
588}
589early_param("xmon", early_xmon);
590#endif