summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-02-11 17:16:03 -0200
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:40:47 +0200
commit2785c8d052278228cc3806233c09295088f83d42 (patch)
treec8ba8333a8c38bc81d38c656cfe99a6ef93ad33d /arch/x86/kernel
parenta2beab31b167bd8ba49bb84944e07ac096f2ab0a (diff)
x86: call vsmp_init explicitly
It becomes to early for ioremap, so we use early_ioremap Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com> Acked-by: Shai Fultheim <shai@scalemp.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/setup_64.c4
-rw-r--r--arch/x86/kernel/vsmp_64.c11
2 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index f4f7ecfb898c..e67925674eae 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -345,6 +345,10 @@ void __init setup_arch(char **cmdline_p)
if (efi_enabled)
efi_init();
+#ifdef CONFIG_PARAVIRT
+ vsmp_init();
+#endif
+
dmi_scan_machine();
io_delay_init();
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index 976691726de4..fdf9fba6ba9c 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -16,10 +16,10 @@
#include <asm/pci-direct.h>
#include <asm/io.h>
-static void __init vsmp_init(void)
+void __init vsmp_init(void)
{
void *address;
- unsigned int cap, ctl;
+ unsigned int cap, ctl, cfg;
if (!early_pci_allowed())
return;
@@ -32,7 +32,8 @@ static void __init vsmp_init(void)
return;
/* set vSMP magic bits to indicate vSMP capable kernel */
- address = ioremap(read_pci_config(0, 0x1f, 0, PCI_BASE_ADDRESS_0), 8);
+ cfg = read_pci_config(0, 0x1f, 0, PCI_BASE_ADDRESS_0);
+ address = early_ioremap(cfg, 8);
cap = readl(address);
ctl = readl(address + 4);
printk(KERN_INFO "vSMP CTL: capabilities:0x%08x control:0x%08x\n",
@@ -45,8 +46,6 @@ static void __init vsmp_init(void)
printk(KERN_INFO "vSMP CTL: control set to:0x%08x\n", ctl);
}
- iounmap(address);
+ early_iounmap(address, 8);
return;
}
-
-core_initcall(vsmp_init);