]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] vmi: smp fixes
authorZachary Amsden <zach@vmware.com>
Mon, 5 Mar 2007 08:30:43 +0000 (00:30 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 5 Mar 2007 15:57:53 +0000 (07:57 -0800)
Critical fixes for SMP.

Fix a couple functions which needed to be __devinit and fix a bogus parameter
to AP startup that just so happened to work because the low virtual mapping of
memory was still established.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/vmi.c
arch/i386/kernel/vmitime.c

index af8c54245f9a8b1e7828033f11bfda4fc6d21365..245d091d659dae06d3a4e602e6515f1db600cfbe 100644 (file)
@@ -525,13 +525,14 @@ void vmi_pmd_clear(pmd_t *pmd)
 #endif
 
 #ifdef CONFIG_SMP
-struct vmi_ap_state ap;
 extern void setup_pda(void);
 
-static void __init /* XXX cpu hotplug */
+static void __devinit
 vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
                     unsigned long start_esp)
 {
+       struct vmi_ap_state ap;
+
        /* Default everything to zero.  This is fine for most GPRs. */
        memset(&ap, 0, sizeof(struct vmi_ap_state));
 
@@ -570,7 +571,7 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
        /* Protected mode, paging, AM, WP, NE, MP. */
        ap.cr0 = 0x80050023;
        ap.cr4 = mmu_cr4_features;
-       vmi_ops.set_initial_ap_state(__pa(&ap), phys_apicid);
+       vmi_ops.set_initial_ap_state((u32)&ap, phys_apicid);
 }
 #endif
 
index d21779749838689e7eb4971d83474f8a5fe8f9aa..8dc72d5756668c27f19a1bf678e6c3b80318d4dc 100644 (file)
@@ -243,7 +243,7 @@ void __init vmi_timer_setup_boot_alarm(void)
 
 /* Initialize the time accounting variables for an AP on an SMP system.
  * Also, set the local alarm for the AP. */
-void __init vmi_timer_setup_secondary_alarm(void)
+void __devinit vmi_timer_setup_secondary_alarm(void)
 {
        int cpu = smp_processor_id();