diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-02-11 14:16:03 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:40:47 -0400 |
commit | 2785c8d052278228cc3806233c09295088f83d42 (patch) | |
tree | c8ba8333a8c38bc81d38c656cfe99a6ef93ad33d /arch/x86 | |
parent | a2beab31b167bd8ba49bb84944e07ac096f2ab0a (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')
-rw-r--r-- | arch/x86/kernel/setup_64.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/vsmp_64.c | 11 |
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 | ||
19 | static void __init vsmp_init(void) | 19 | void __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 | |||
52 | core_initcall(vsmp_init); | ||