aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 13:53:16 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 13:53:16 -0400
commit9b610fda0df5d0f0b0c64242e37441ad1b384aac (patch)
tree0ea14b15f2e6546f37fe18d8ac3dc83077ec0e55 /arch/powerpc/kernel/setup_32.c
parentb8f8c3cf0a4ac0632ec3f0e15e9dc0c29de917af (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'linus' into timers/nohz
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r--arch/powerpc/kernel/setup_32.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 5112a4aa801d..4efebe88e64a 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -81,7 +81,7 @@ int ucache_bsize;
81 * from the address that it was linked at, so we must use RELOC/PTRRELOC 81 * from the address that it was linked at, so we must use RELOC/PTRRELOC
82 * to access static data (including strings). -- paulus 82 * to access static data (including strings). -- paulus
83 */ 83 */
84unsigned long __init early_init(unsigned long dt_ptr) 84notrace unsigned long __init early_init(unsigned long dt_ptr)
85{ 85{
86 unsigned long offset = reloc_offset(); 86 unsigned long offset = reloc_offset();
87 struct cpu_spec *spec; 87 struct cpu_spec *spec;
@@ -101,6 +101,10 @@ unsigned long __init early_init(unsigned long dt_ptr)
101 PTRRELOC(&__start___ftr_fixup), 101 PTRRELOC(&__start___ftr_fixup),
102 PTRRELOC(&__stop___ftr_fixup)); 102 PTRRELOC(&__stop___ftr_fixup));
103 103
104 do_lwsync_fixups(spec->cpu_features,
105 PTRRELOC(&__start___lwsync_fixup),
106 PTRRELOC(&__stop___lwsync_fixup));
107
104 return KERNELBASE + offset; 108 return KERNELBASE + offset;
105} 109}
106 110
@@ -111,7 +115,7 @@ unsigned long __init early_init(unsigned long dt_ptr)
111 * This is called very early on the boot process, after a minimal 115 * This is called very early on the boot process, after a minimal
112 * MMU environment has been set up but before MMU_init is called. 116 * MMU environment has been set up but before MMU_init is called.
113 */ 117 */
114void __init machine_init(unsigned long dt_ptr, unsigned long phys) 118notrace void __init machine_init(unsigned long dt_ptr, unsigned long phys)
115{ 119{
116 /* Enable early debugging if any specified (see udbg.h) */ 120 /* Enable early debugging if any specified (see udbg.h) */
117 udbg_early_init(); 121 udbg_early_init();
@@ -127,13 +131,18 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys)
127 ppc_md.power_save = ppc6xx_idle; 131 ppc_md.power_save = ppc6xx_idle;
128#endif 132#endif
129 133
134#ifdef CONFIG_E500
135 if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
136 cpu_has_feature(CPU_FTR_CAN_NAP))
137 ppc_md.power_save = e500_idle;
138#endif
130 if (ppc_md.progress) 139 if (ppc_md.progress)
131 ppc_md.progress("id mach(): done", 0x200); 140 ppc_md.progress("id mach(): done", 0x200);
132} 141}
133 142
134#ifdef CONFIG_BOOKE_WDT 143#ifdef CONFIG_BOOKE_WDT
135/* Checks wdt=x and wdt_period=xx command-line option */ 144/* Checks wdt=x and wdt_period=xx command-line option */
136int __init early_parse_wdt(char *p) 145notrace int __init early_parse_wdt(char *p)
137{ 146{
138 if (p && strncmp(p, "0", 1) != 0) 147 if (p && strncmp(p, "0", 1) != 0)
139 booke_wdt_enabled = 1; 148 booke_wdt_enabled = 1;
@@ -248,6 +257,28 @@ static void __init irqstack_early_init(void)
248#define irqstack_early_init() 257#define irqstack_early_init()
249#endif 258#endif
250 259
260#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
261static void __init exc_lvl_early_init(void)
262{
263 unsigned int i;
264
265 /* interrupt stacks must be in lowmem, we get that for free on ppc32
266 * as the lmb is limited to lowmem by LMB_REAL_LIMIT */
267 for_each_possible_cpu(i) {
268 critirq_ctx[i] = (struct thread_info *)
269 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
270#ifdef CONFIG_BOOKE
271 dbgirq_ctx[i] = (struct thread_info *)
272 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
273 mcheckirq_ctx[i] = (struct thread_info *)
274 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
275#endif
276 }
277}
278#else
279#define exc_lvl_early_init()
280#endif
281
251/* Warning, IO base is not yet inited */ 282/* Warning, IO base is not yet inited */
252void __init setup_arch(char **cmdline_p) 283void __init setup_arch(char **cmdline_p)
253{ 284{
@@ -305,6 +336,8 @@ void __init setup_arch(char **cmdline_p)
305 init_mm.end_data = (unsigned long) _edata; 336 init_mm.end_data = (unsigned long) _edata;
306 init_mm.brk = klimit; 337 init_mm.brk = klimit;
307 338
339 exc_lvl_early_init();
340
308 irqstack_early_init(); 341 irqstack_early_init();
309 342
310 /* set up the bootmem stuff with available memory */ 343 /* set up the bootmem stuff with available memory */