aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_32.S
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-04-28 02:21:22 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-29 01:57:34 -0400
commit85218827cc4ca900867807f19345418164ffc108 (patch)
tree1813b7fadb7c077acd0ef62f57385b7424ca0121 /arch/powerpc/kernel/entry_32.S
parentdd18434ff0b7d9b9ad3d596985fc84b329d2f9a8 (diff)
[POWERPC] Add IRQSTACKS support on ppc32
This makes it possible to use separate stacks for hard and soft IRQs on 32-bit powerpc as well as on 64-bit. The code for 32-bit is just the 32-bit analog of the 64-bit code. * Added allocation and initialization of the irq stacks. We limit the stacks to be in lowmem for ppc32. * Implemented ppc32 versions of call_do_softirq() and call_handle_irq() to switch the stack pointers * Reworked how we do stack overflow detection. We now keep around the limit of the stack in the thread_struct and compare against the limit to see if we've overflowed. We can now use this on ppc64 if desired. [ paulus@samba.org: Fixed bug on 6xx where we need to reload r9 with the thread_info pointer. ] Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_32.S')
-rw-r--r--arch/powerpc/kernel/entry_32.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 84c868633068..0c8614d9875c 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -137,11 +137,12 @@ transfer_to_handler:
1372: /* if from kernel, check interrupted DOZE/NAP mode and 1372: /* if from kernel, check interrupted DOZE/NAP mode and
138 * check for stack overflow 138 * check for stack overflow
139 */ 139 */
140 lwz r9,THREAD_INFO-THREAD(r12) 140 lwz r9,KSP_LIMIT(r12)
141 cmplw r1,r9 /* if r1 <= current->thread_info */ 141 cmplw r1,r9 /* if r1 <= ksp_limit */
142 ble- stack_ovf /* then the kernel stack overflowed */ 142 ble- stack_ovf /* then the kernel stack overflowed */
1435: 1435:
144#ifdef CONFIG_6xx 144#ifdef CONFIG_6xx
145 rlwinm r9,r1,0,0,31-THREAD_SHIFT
145 tophys(r9,r9) /* check local flags */ 146 tophys(r9,r9) /* check local flags */
146 lwz r12,TI_LOCAL_FLAGS(r9) 147 lwz r12,TI_LOCAL_FLAGS(r9)
147 mtcrf 0x01,r12 148 mtcrf 0x01,r12