LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Glauber Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, glommer@gmail.com, tglx@linutronix.de,
mingo@elte.hu, ehabkost@redhat.com, jeremy@goop.org,
avi@qumranet.com, anthony@codemonkey.ws,
virtualization@lists.linux-foundation.org, ak@suse.de,
chrisw@sous-sol.org, kiran@scalemp.com, shai@scalemp.com,
Glauber Costa <gcosta@redhat.com>
Subject: [PATCH 3/5] [PATCH] call vsmp_init explicitly
Date: Mon, 11 Feb 2008 17:16:03 -0200 [thread overview]
Message-ID: <1202757365-18634-3-git-send-email-gcosta@redhat.com> (raw)
In-Reply-To: <1202757365-18634-2-git-send-email-gcosta@redhat.com>
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>
---
arch/x86/kernel/setup_64.c | 4 ++++
arch/x86/kernel/vsmp_64.c | 11 +++++------
include/asm-x86/setup.h | 4 ++++
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index a49f5f7..6f5571c 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -346,6 +346,10 @@ #endif
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 9766917..fdf9fba 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -16,10 +16,10 @@ #include <linux/pci_regs.h>
#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);
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h
index 071e054..f745de2 100644
--- a/include/asm-x86/setup.h
+++ b/include/asm-x86/setup.h
@@ -4,6 +4,10 @@ #define _ASM_X86_SETUP_H
#define COMMAND_LINE_SIZE 2048
#ifndef __ASSEMBLY__
+
+/* Interrupt control for vSMPowered x86_64 systems */
+void vsmp_init(void);
+
char *machine_specific_memory_setup(void);
#ifndef CONFIG_PARAVIRT
#define paravirt_post_allocator_init() do {} while (0)
--
1.4.2
next prev parent reply other threads:[~2008-02-11 19:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 19:16 [PATCH 1/5] Change vsmp compile dependency Glauber Costa
2008-02-11 19:16 ` [PATCH 2/5] [PATCH] make vsmp_init void, instead of static int Glauber Costa
2008-02-11 19:16 ` Glauber Costa [this message]
2008-02-11 19:16 ` [PATCH 4/5] [PATCH] introduce paravirt helpers Glauber Costa
2008-02-11 19:16 ` [PATCH 5/5] [PATCH] use the " Glauber Costa
2008-02-17 18:05 ` [PATCH 4/5] [PATCH] introduce " Ingo Molnar
2008-02-17 20:56 ` Glauber Costa
2008-02-19 19:59 ` Ravikiran Thirumalai
2008-02-17 18:04 ` [PATCH 3/5] [PATCH] call vsmp_init explicitly Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202757365-18634-3-git-send-email-gcosta@redhat.com \
--to=gcosta@redhat.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=anthony@codemonkey.ws \
--cc=avi@qumranet.com \
--cc=chrisw@sous-sol.org \
--cc=ehabkost@redhat.com \
--cc=glommer@gmail.com \
--cc=jeremy@goop.org \
--cc=kiran@scalemp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shai@scalemp.com \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--subject='Re: [PATCH 3/5] [PATCH] call vsmp_init explicitly' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).