diff options
author | Tiejun Chen <tiejun.chen@windriver.com> | 2013-10-23 05:31:21 -0400 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-03-19 20:57:09 -0400 |
commit | 160c73243350304c09e69cbcc4fa34ff89868b68 (patch) | |
tree | 0e4bb349289df87f64ccae7a9184088b3532ffc1 | |
parent | b0b7dcbdf327bc57018d498e07331b2c96916dc7 (diff) |
powerpc/book3e: initialize crit/mc/dbg kernel stack pointers
We already allocated critical/machine/debug check exceptions, but
we also should initialize those associated kernel stack pointers
for use by special exceptions in the PACA.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index f5f11a7d30e5..da9c42f53bb1 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -552,14 +552,20 @@ static void __init irqstack_early_init(void) | |||
552 | static void __init exc_lvl_early_init(void) | 552 | static void __init exc_lvl_early_init(void) |
553 | { | 553 | { |
554 | unsigned int i; | 554 | unsigned int i; |
555 | unsigned long sp; | ||
555 | 556 | ||
556 | for_each_possible_cpu(i) { | 557 | for_each_possible_cpu(i) { |
557 | critirq_ctx[i] = (struct thread_info *) | 558 | sp = memblock_alloc(THREAD_SIZE, THREAD_SIZE); |
558 | __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); | 559 | critirq_ctx[i] = (struct thread_info *)__va(sp); |
559 | dbgirq_ctx[i] = (struct thread_info *) | 560 | paca[i].crit_kstack = __va(sp + THREAD_SIZE); |
560 | __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); | 561 | |
561 | mcheckirq_ctx[i] = (struct thread_info *) | 562 | sp = memblock_alloc(THREAD_SIZE, THREAD_SIZE); |
562 | __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE)); | 563 | dbgirq_ctx[i] = (struct thread_info *)__va(sp); |
564 | paca[i].dbg_kstack = __va(sp + THREAD_SIZE); | ||
565 | |||
566 | sp = memblock_alloc(THREAD_SIZE, THREAD_SIZE); | ||
567 | mcheckirq_ctx[i] = (struct thread_info *)__va(sp); | ||
568 | paca[i].mc_kstack = __va(sp + THREAD_SIZE); | ||
563 | } | 569 | } |
564 | 570 | ||
565 | if (cpu_has_feature(CPU_FTR_DEBUG_LVL_EXC)) | 571 | if (cpu_has_feature(CPU_FTR_DEBUG_LVL_EXC)) |