aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-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)
345 if (efi_enabled) 345 if (efi_enabled)
346 efi_init(); 346 efi_init();
347 347
348#ifdef CONFIG_PARAVIRT
349 vsmp_init();
350#endif
351
348 dmi_scan_machine(); 352 dmi_scan_machine();
349 353
350 io_delay_init(); 354 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 @@
16#include <asm/pci-direct.h> 16#include <asm/pci-direct.h>
17#include <asm/io.h> 17#include <asm/io.h>
18 18
19static void __init vsmp_init(void) 19void __init vsmp_init(void)
20{ 20{
21 void *address; 21 void *address;
22 unsigned int cap, ctl; 22 unsigned int cap, ctl, cfg;
23 23
24 if (!early_pci_allowed()) 24 if (!early_pci_allowed())
25 return; 25 return;
@@ -32,7 +32,8 @@ static void __init vsmp_init(void)
32 return; 32 return;
33 33
34 /* set vSMP magic bits to indicate vSMP capable kernel */ 34 /* set vSMP magic bits to indicate vSMP capable kernel */
35 address = ioremap(read_pci_config(0, 0x1f, 0, PCI_BASE_ADDRESS_0), 8); 35 cfg = read_pci_config(0, 0x1f, 0, PCI_BASE_ADDRESS_0);
36 address = early_ioremap(cfg, 8);
36 cap = readl(address); 37 cap = readl(address);
37 ctl = readl(address + 4); 38 ctl = readl(address + 4);
38 printk(KERN_INFO "vSMP CTL: capabilities:0x%08x control:0x%08x\n", 39 printk(KERN_INFO "vSMP CTL: capabilities:0x%08x control:0x%08x\n",
@@ -45,8 +46,6 @@ static void __init vsmp_init(void)
45 printk(KERN_INFO "vSMP CTL: control set to:0x%08x\n", ctl); 46 printk(KERN_INFO "vSMP CTL: control set to:0x%08x\n", ctl);
46 } 47 }
47 48
48 iounmap(address); 49 early_iounmap(address, 8);
49 return; 50 return;
50} 51}
51
52core_initcall(vsmp_init);