From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Andrew Morton <akpm@linux-foundation.org>, Andi Kleen <ak@suse.de>
Cc: virtualization@lists.osdl.org, xen-devel@lists.xensource.com,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [patch 3/5] i386-gdt-pda Update lguest to initialize gdt without pda
Date: Mon, 26 Mar 2007 17:21:32 -0700 [thread overview]
Message-ID: <20070327002841.672969672@goop.org> (raw)
In-Reply-To: 20070327002129.240126099@goop.org
[-- Attachment #1: lguest-use-percpu.patch --]
[-- Type: text/plain, Size: 1477 bytes --]
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
---
arch/i386/lguest/lguest.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
===================================================================
--- a/arch/i386/lguest/lguest.c
+++ b/arch/i386/lguest/lguest.c
@@ -34,7 +34,6 @@
#include <asm/desc.h>
#include <asm/setup.h>
#include <asm/e820.h>
-#include <asm/pda.h>
#include <asm/asm-offsets.h>
#include <asm/mce.h>
@@ -449,12 +448,10 @@ static void lguest_power_off(void)
hcall(LHCALL_CRASH, __pa("Power down"), 0, 0);
}
-/* From head.S */
-extern void setup_pda(void);
-extern struct Xgt_desc_struct early_gdt_descr;
-
static __attribute_used__ __init void lguest_init(void)
{
+ struct Xgt_desc_struct gdt_desc;
+
paravirt_ops.name = "lguest";
paravirt_ops.paravirt_enabled = 1;
paravirt_ops.kernel_rpl = 1;
@@ -513,10 +510,10 @@ static __attribute_used__ __init void lg
/* We use top of mem for initial pagetables. */
init_pg_tables_end = __pa(pg0);
- /* set up PDA descriptor */
- setup_pda();
- load_gdt(&early_gdt_descr);
- asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_PDA) : "memory");
+ /* set up gdt */
+ gdt_desc.address = (unsigned long)per_cpu__gdt_page.gdt;
+ gdt_desc.size = sizeof(struct gdt_page)-1;
+ load_gdt(&gdt_desc);
reserve_top_address(lguest_data.reserve_mem);
--
next prev parent reply other threads:[~2007-03-27 0:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-27 0:21 [patch 0/5] i386-gdt-pda i386 gdt and pda updates Jeremy Fitzhardinge
2007-03-27 0:21 ` [patch 1/5] i386-gdt-pda Page-align the GDT Jeremy Fitzhardinge
2007-03-27 0:21 ` [patch 2/5] i386-gdt-pda Convert PDA into the percpu section Jeremy Fitzhardinge
2007-03-27 0:21 ` Jeremy Fitzhardinge [this message]
2007-03-27 3:32 ` [patch 3/5] i386-gdt-pda Update lguest to initialize gdt without pda Rusty Russell
2007-03-27 0:21 ` [patch 4/5] i386-gdt-pda cleanups to help using per-cpu variables from asm Jeremy Fitzhardinge
2007-03-27 0:21 ` [patch 5/5] i386-gdt-pda Define per_cpu_offset Jeremy Fitzhardinge
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=20070327002841.672969672@goop.org \
--to=jeremy@goop.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
--cc=xen-devel@lists.xensource.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).