aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/vmi.c
diff options
context:
space:
mode:
authorZachary Amsden <zach@vmware.com>2007-03-05 03:30:43 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-05 10:57:53 -0500
commitc6b36e9a3c57b73c7a6bdf787baa55f21195bba9 (patch)
tree3e9e745420dc2f33f19140dbfcc34d8c042c675d /arch/i386/kernel/vmi.c
parent772205f62ebcce2d60bfa5166f56c78044afab7d (diff)
[PATCH] vmi: smp fixes
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>
Diffstat (limited to 'arch/i386/kernel/vmi.c')
-rw-r--r--arch/i386/kernel/vmi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c
index af8c54245f9a..245d091d659d 100644
--- a/arch/i386/kernel/vmi.c
+++ b/arch/i386/kernel/vmi.c
@@ -525,13 +525,14 @@ void vmi_pmd_clear(pmd_t *pmd)
525#endif 525#endif
526 526
527#ifdef CONFIG_SMP 527#ifdef CONFIG_SMP
528struct vmi_ap_state ap;
529extern void setup_pda(void); 528extern void setup_pda(void);
530 529
531static void __init /* XXX cpu hotplug */ 530static void __devinit
532vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip, 531vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
533 unsigned long start_esp) 532 unsigned long start_esp)
534{ 533{
534 struct vmi_ap_state ap;
535
535 /* Default everything to zero. This is fine for most GPRs. */ 536 /* Default everything to zero. This is fine for most GPRs. */
536 memset(&ap, 0, sizeof(struct vmi_ap_state)); 537 memset(&ap, 0, sizeof(struct vmi_ap_state));
537 538
@@ -570,7 +571,7 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
570 /* Protected mode, paging, AM, WP, NE, MP. */ 571 /* Protected mode, paging, AM, WP, NE, MP. */
571 ap.cr0 = 0x80050023; 572 ap.cr0 = 0x80050023;
572 ap.cr4 = mmu_cr4_features; 573 ap.cr4 = mmu_cr4_features;
573 vmi_ops.set_initial_ap_state(__pa(&ap), phys_apicid); 574 vmi_ops.set_initial_ap_state((u32)&ap, phys_apicid);
574} 575}
575#endif 576#endif
576 577