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>
This commit is contained in:
parent
a2beab31b1
commit
2785c8d052
|
@ -345,6 +345,10 @@ void __init setup_arch(char **cmdline_p)
|
||||||
if (efi_enabled)
|
if (efi_enabled)
|
||||||
efi_init();
|
efi_init();
|
||||||
|
|
||||||
|
#ifdef CONFIG_PARAVIRT
|
||||||
|
vsmp_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
dmi_scan_machine();
|
dmi_scan_machine();
|
||||||
|
|
||||||
io_delay_init();
|
io_delay_init();
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
#include <asm/pci-direct.h>
|
#include <asm/pci-direct.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
static void __init vsmp_init(void)
|
void __init vsmp_init(void)
|
||||||
{
|
{
|
||||||
void *address;
|
void *address;
|
||||||
unsigned int cap, ctl;
|
unsigned int cap, ctl, cfg;
|
||||||
|
|
||||||
if (!early_pci_allowed())
|
if (!early_pci_allowed())
|
||||||
return;
|
return;
|
||||||
|
@ -32,7 +32,8 @@ static void __init vsmp_init(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* set vSMP magic bits to indicate vSMP capable kernel */
|
/* 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);
|
cap = readl(address);
|
||||||
ctl = readl(address + 4);
|
ctl = readl(address + 4);
|
||||||
printk(KERN_INFO "vSMP CTL: capabilities:0x%08x control:0x%08x\n",
|
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);
|
printk(KERN_INFO "vSMP CTL: control set to:0x%08x\n", ctl);
|
||||||
}
|
}
|
||||||
|
|
||||||
iounmap(address);
|
early_iounmap(address, 8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
core_initcall(vsmp_init);
|
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#define COMMAND_LINE_SIZE 2048
|
#define COMMAND_LINE_SIZE 2048
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Interrupt control for vSMPowered x86_64 systems */
|
||||||
|
void vsmp_init(void);
|
||||||
|
|
||||||
char *machine_specific_memory_setup(void);
|
char *machine_specific_memory_setup(void);
|
||||||
#ifndef CONFIG_PARAVIRT
|
#ifndef CONFIG_PARAVIRT
|
||||||
#define paravirt_post_allocator_init() do {} while (0)
|
#define paravirt_post_allocator_init() do {} while (0)
|
||||||
|
|
Loading…
Reference in New Issue