|
@@ -1750,8 +1750,17 @@ format_mca_init_stack(void *mca_data, unsigned long offset,
|
|
strncpy(p->comm, type, sizeof(p->comm)-1);
|
|
strncpy(p->comm, type, sizeof(p->comm)-1);
|
|
}
|
|
}
|
|
|
|
|
|
-/* Do per-CPU MCA-related initialization. */
|
|
|
|
|
|
+/* Caller prevents this from being called after init */
|
|
|
|
+static void * __init_refok mca_bootmem(void)
|
|
|
|
+{
|
|
|
|
+ void *p;
|
|
|
|
|
|
|
|
+ p = alloc_bootmem(sizeof(struct ia64_mca_cpu) * NR_CPUS +
|
|
|
|
+ KERNEL_STACK_SIZE);
|
|
|
|
+ return (void *)ALIGN((unsigned long)p, KERNEL_STACK_SIZE);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* Do per-CPU MCA-related initialization. */
|
|
void __cpuinit
|
|
void __cpuinit
|
|
ia64_mca_cpu_init(void *cpu_data)
|
|
ia64_mca_cpu_init(void *cpu_data)
|
|
{
|
|
{
|
|
@@ -1763,11 +1772,7 @@ ia64_mca_cpu_init(void *cpu_data)
|
|
int cpu;
|
|
int cpu;
|
|
|
|
|
|
first_time = 0;
|
|
first_time = 0;
|
|
- mca_data = alloc_bootmem(sizeof(struct ia64_mca_cpu)
|
|
|
|
- * NR_CPUS + KERNEL_STACK_SIZE);
|
|
|
|
- mca_data = (void *)(((unsigned long)mca_data +
|
|
|
|
- KERNEL_STACK_SIZE - 1) &
|
|
|
|
- (-KERNEL_STACK_SIZE));
|
|
|
|
|
|
+ mca_data = mca_bootmem();
|
|
for (cpu = 0; cpu < NR_CPUS; cpu++) {
|
|
for (cpu = 0; cpu < NR_CPUS; cpu++) {
|
|
format_mca_init_stack(mca_data,
|
|
format_mca_init_stack(mca_data,
|
|
offsetof(struct ia64_mca_cpu, mca_stack),
|
|
offsetof(struct ia64_mca_cpu, mca_stack),
|