aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/xtensa/kernel/process.c1
-rw-r--r--drivers/lguest/interrupts_and_traps.c7
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index ce758bab95b1..dd498f1604e1 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -30,6 +30,7 @@
30#include <linux/init_task.h> 30#include <linux/init_task.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/mqueue.h> 32#include <linux/mqueue.h>
33#include <linux/fs.h>
33 34
34#include <asm/pgtable.h> 35#include <asm/pgtable.h>
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c
index 49aa55577d0d..39731232d827 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -270,8 +270,11 @@ void pin_stack_pages(struct lguest *lg)
270 /* Depending on the CONFIG_4KSTACKS option, the Guest can have one or 270 /* Depending on the CONFIG_4KSTACKS option, the Guest can have one or
271 * two pages of stack space. */ 271 * two pages of stack space. */
272 for (i = 0; i < lg->stack_pages; i++) 272 for (i = 0; i < lg->stack_pages; i++)
273 /* The stack grows *upwards*, hence the subtraction */ 273 /* The stack grows *upwards*, so the address we're given is the
274 pin_page(lg, lg->esp1 - i * PAGE_SIZE); 274 * start of the page after the kernel stack. Subtract one to
275 * get back onto the first stack page, and keep subtracting to
276 * get to the rest of the stack pages. */
277 pin_page(lg, lg->esp1 - 1 - i * PAGE_SIZE);
275} 278}
276 279
277/* Direct traps also mean that we need to know whenever the Guest wants to use 280/* Direct traps also mean that we need to know whenever the Guest wants to use