diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-06-30 15:08:27 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-06-30 15:08:27 +1000 |
commit | 512d31d6a824a961f39b418f11480f678320e4f3 (patch) | |
tree | 61f94e62f86d8668362548d6d911f937c98c2e71 /arch/ppc64/kernel/ItLpQueue.c | |
parent | 1b19bc721416ae5bc813521d9e010a89f4816120 (diff) |
[PATCH] ppc64: Move initialisation of xItLpQueue into ItLpQueue.c
The xItLpQueue is initalised manually in iSeries_setup_arch(). Move
this code into ItLpQueue.c for a cleaner separation.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
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 35f6deac0b9..091aaed4842 100644 --- a/arch/ppc64/kernel/ItLpQueue.c +++ b/arch/ppc64/kernel/ItLpQueue.c @@ -11,6 +11,7 @@ #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/bootmem.h> #include <asm/system.h> #include <asm/paca.h> #include <asm/iSeries/ItLpQueue.h> @@ -186,3 +187,24 @@ static int set_spread_lpevents(char *str) } __setup("spread_lpevents=", set_spread_lpevents); +void setup_hvlpevent_queue(void) +{ + void *eventStack; + + /* + * Allocate a page for the Event Stack. The Hypervisor needs the + * absolute real address, so we subtract out the KERNELBASE and add + * in the absolute real address of the kernel load area. + */ + eventStack = alloc_bootmem_pages(LpEventStackSize); + memset(eventStack, 0, LpEventStackSize); + + /* Invoke the hypervisor to initialize the event stack */ + HvCallEvent_setLpEventStack(0, eventStack, LpEventStackSize); + + xItLpQueue.xSlicEventStackPtr = (char *)eventStack; + xItLpQueue.xSlicCurEventPtr = (char *)eventStack; + xItLpQueue.xSlicLastValidEventPtr = (char *)eventStack + + (LpEventStackSize - LpEventMaxSize); + xItLpQueue.xIndex = 0; +} |