summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/mca.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-01 20:48:54 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-01 20:48:54 -0700
commit1ed4395035a6791ebbbf618429a58ab9c207cc83 (patch)
treea34158c5dd3c4ca70f140da5a484ca6142a3b8c3 /arch/ia64/kernel/mca.c
parent878701db07db3f0b59f14f0c525b681e4ca81551 (diff)
parentb718f91c14604e4ab5cdfe8d3baff8111425ea7d (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] ITC: Reduce rating for ITC clock if ITCs are drifty [IA64] SN2: Fix up sn2_rtc clock [IA64] Fix wrong access to irq_desc[] in iosapic_register_intr(). [IA64] Fix possible race in destroy_and_reserve_irq() [IA64] Fix registered interrupt check [IA64] Remove a few duplicate includes [IA64] Allow smp_call_function_single() to current cpu [IA64] fix a few section mismatch warnings
Diffstat (limited to 'arch/ia64/kernel/mca.c')
-rw-r--r--arch/ia64/kernel/mca.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 4b5daa3cc0f..ff28620cb99 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,
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
ia64_mca_cpu_init(void *cpu_data)
{
@@ -1763,11 +1772,7 @@ ia64_mca_cpu_init(void *cpu_data)
int cpu;
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++) {
format_mca_init_stack(mca_data,
offsetof(struct ia64_mca_cpu, mca_stack),