diff options
Diffstat (limited to 'arch/ppc64/kernel/ItLpQueue.c')
-rw-r--r-- | arch/ppc64/kernel/ItLpQueue.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/ItLpQueue.c b/arch/ppc64/kernel/ItLpQueue.c index 35f6deac0b99..091aaed4842c 100644 --- a/arch/ppc64/kernel/ItLpQueue.c +++ b/arch/ppc64/kernel/ItLpQueue.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/stddef.h> | 11 | #include <linux/stddef.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/bootmem.h> | ||
14 | #include <asm/system.h> | 15 | #include <asm/system.h> |
15 | #include <asm/paca.h> | 16 | #include <asm/paca.h> |
16 | #include <asm/iSeries/ItLpQueue.h> | 17 | #include <asm/iSeries/ItLpQueue.h> |
@@ -186,3 +187,24 @@ static int set_spread_lpevents(char *str) | |||
186 | } | 187 | } |
187 | __setup("spread_lpevents=", set_spread_lpevents); | 188 | __setup("spread_lpevents=", set_spread_lpevents); |
188 | 189 | ||
190 | void setup_hvlpevent_queue(void) | ||
191 | { | ||
192 | void *eventStack; | ||
193 | |||
194 | /* | ||
195 | * Allocate a page for the Event Stack. The Hypervisor needs the | ||
196 | * absolute real address, so we subtract out the KERNELBASE and add | ||
197 | * in the absolute real address of the kernel load area. | ||
198 | */ | ||
199 | eventStack = alloc_bootmem_pages(LpEventStackSize); | ||
200 | memset(eventStack, 0, LpEventStackSize); | ||
201 | |||
202 | /* Invoke the hypervisor to initialize the event stack */ | ||
203 | HvCallEvent_setLpEventStack(0, eventStack, LpEventStackSize); | ||
204 | |||
205 | xItLpQueue.xSlicEventStackPtr = (char *)eventStack; | ||
206 | xItLpQueue.xSlicCurEventPtr = (char *)eventStack; | ||
207 | xItLpQueue.xSlicLastValidEventPtr = (char *)eventStack + | ||
208 | (LpEventStackSize - LpEventMaxSize); | ||
209 | xItLpQueue.xIndex = 0; | ||
210 | } | ||