diff options
-rw-r--r-- | arch/x86/kernel/cpu/common_64.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c index 6f9b8924bdc0..8396fd7628a9 100644 --- a/arch/x86/kernel/cpu/common_64.c +++ b/arch/x86/kernel/cpu/common_64.c | |||
@@ -493,17 +493,20 @@ void pda_init(int cpu) | |||
493 | /* others are initialized in smpboot.c */ | 493 | /* others are initialized in smpboot.c */ |
494 | pda->pcurrent = &init_task; | 494 | pda->pcurrent = &init_task; |
495 | pda->irqstackptr = boot_cpu_stack; | 495 | pda->irqstackptr = boot_cpu_stack; |
496 | pda->irqstackptr += IRQSTACKSIZE - 64; | ||
496 | } else { | 497 | } else { |
497 | pda->irqstackptr = (char *) | 498 | if (!pda->irqstackptr) { |
498 | __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER); | 499 | pda->irqstackptr = (char *) |
499 | if (!pda->irqstackptr) | 500 | __get_free_pages(GFP_ATOMIC, IRQSTACK_ORDER); |
500 | panic("cannot allocate irqstack for cpu %d", cpu); | 501 | if (!pda->irqstackptr) |
502 | panic("cannot allocate irqstack for cpu %d", | ||
503 | cpu); | ||
504 | pda->irqstackptr += IRQSTACKSIZE - 64; | ||
505 | } | ||
501 | 506 | ||
502 | if (pda->nodenumber == 0 && cpu_to_node(cpu) != NUMA_NO_NODE) | 507 | if (pda->nodenumber == 0 && cpu_to_node(cpu) != NUMA_NO_NODE) |
503 | pda->nodenumber = cpu_to_node(cpu); | 508 | pda->nodenumber = cpu_to_node(cpu); |
504 | } | 509 | } |
505 | |||
506 | pda->irqstackptr += IRQSTACKSIZE-64; | ||
507 | } | 510 | } |
508 | 511 | ||
509 | char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + | 512 | char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + |