summaryrefslogtreecommitdiff
path: root/drivers/lguest/x86
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-04-22 14:10:38 +0930
committerRusty Russell <rusty@rustcorp.com.au>2013-04-22 15:31:36 +0930
commit93a2cdff98243df06bafd3c4f3b31b38f0d0fe3e (patch)
treecfda9a918a92ac0308e1c888489c83c0b243138a /drivers/lguest/x86
parent856c608827928d29f80605e85fc3f8f0ab3af4fb (diff)
lguest: assume Switcher text is a single page.
ie. SHARED_SWITCHER_PAGES == 1. It is well under a page, and it's a minor simplification: it's nice to have *one* simplification in a patch series! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/x86')
-rw-r--r--drivers/lguest/x86/core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
index 20fae765d600..f0a3347b6441 100644
--- a/drivers/lguest/x86/core.c
+++ b/drivers/lguest/x86/core.c
@@ -62,11 +62,10 @@ static unsigned long switcher_offset(void)
return switcher_addr - (unsigned long)start_switcher_text;
}
-/* This cpu's struct lguest_pages. */
+/* This cpu's struct lguest_pages (after the Switcher text page) */
static struct lguest_pages *lguest_pages(unsigned int cpu)
{
- return &(((struct lguest_pages *)
- (switcher_addr + SHARED_SWITCHER_PAGES*PAGE_SIZE))[cpu]);
+ return &(((struct lguest_pages *)(switcher_addr + PAGE_SIZE))[cpu]);
}
static DEFINE_PER_CPU(struct lg_cpu *, lg_last_cpu);