aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/x86
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-04-22 00:40:38 -0400
committerRusty Russell <rusty@rustcorp.com.au>2013-04-22 02:01:36 -0400
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)
62 return switcher_addr - (unsigned long)start_switcher_text; 62 return switcher_addr - (unsigned long)start_switcher_text;
63} 63}
64 64
65/* This cpu's struct lguest_pages. */ 65/* This cpu's struct lguest_pages (after the Switcher text page) */
66static struct lguest_pages *lguest_pages(unsigned int cpu) 66static struct lguest_pages *lguest_pages(unsigned int cpu)
67{ 67{
68 return &(((struct lguest_pages *) 68 return &(((struct lguest_pages *)(switcher_addr + PAGE_SIZE))[cpu]);
69 (switcher_addr + SHARED_SWITCHER_PAGES*PAGE_SIZE))[cpu]);
70} 69}
71 70
72static DEFINE_PER_CPU(struct lg_cpu *, lg_last_cpu); 71static DEFINE_PER_CPU(struct lg_cpu *, lg_last_cpu);