diff options
Diffstat (limited to 'arch/ia64/kernel/mca.c')
-rw-r--r-- | arch/ia64/kernel/mca.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 4b5daa3cc0fe..ff28620cb992 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1750,8 +1750,17 @@ format_mca_init_stack(void *mca_data, unsigned long offset, | |||
1750 | strncpy(p->comm, type, sizeof(p->comm)-1); | 1750 | strncpy(p->comm, type, sizeof(p->comm)-1); |
1751 | } | 1751 | } |
1752 | 1752 | ||
1753 | /* Do per-CPU MCA-related initialization. */ | 1753 | /* Caller prevents this from being called after init */ |
1754 | static void * __init_refok mca_bootmem(void) | ||
1755 | { | ||
1756 | void *p; | ||
1754 | 1757 | ||
1758 | p = alloc_bootmem(sizeof(struct ia64_mca_cpu) * NR_CPUS + | ||
1759 | KERNEL_STACK_SIZE); | ||
1760 | return (void *)ALIGN((unsigned long)p, KERNEL_STACK_SIZE); | ||
1761 | } | ||
1762 | |||
1763 | /* Do per-CPU MCA-related initialization. */ | ||
1755 | void __cpuinit | 1764 | void __cpuinit |
1756 | ia64_mca_cpu_init(void *cpu_data) | 1765 | ia64_mca_cpu_init(void *cpu_data) |
1757 | { | 1766 | { |
@@ -1763,11 +1772,7 @@ ia64_mca_cpu_init(void *cpu_data) | |||
1763 | int cpu; | 1772 | int cpu; |
1764 | 1773 | ||
1765 | first_time = 0; | 1774 | first_time = 0; |
1766 | mca_data = alloc_bootmem(sizeof(struct ia64_mca_cpu) | 1775 | mca_data = mca_bootmem(); |
1767 | * NR_CPUS + KERNEL_STACK_SIZE); | ||
1768 | mca_data = (void *)(((unsigned long)mca_data + | ||
1769 | KERNEL_STACK_SIZE - 1) & | ||
1770 | (-KERNEL_STACK_SIZE)); | ||
1771 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 1776 | for (cpu = 0; cpu < NR_CPUS; cpu++) { |
1772 | format_mca_init_stack(mca_data, | 1777 | format_mca_init_stack(mca_data, |
1773 | offsetof(struct ia64_mca_cpu, mca_stack), | 1778 | offsetof(struct ia64_mca_cpu, mca_stack), |