diff options
author | Stuart Yoder <stuart.yoder@freescale.com> | 2012-07-16 05:06:48 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-07-26 21:42:31 -0400 |
commit | 1f8b0bc81ac283adcda68805e0e2f5108614db44 (patch) | |
tree | 87ba3db0978a194144738bb2f74e48434b7be730 /arch/powerpc/kernel | |
parent | bdc0077af574800d24318b6945cf2344e8dbb050 (diff) |
powerpc: Set stack limit properly in crit_transfer_to_handler
Commit 9778b696a0188ad3b3524b383953ee73b31b7b68 incorrectly
changes the code setting the stack limit on entry to the
kernel to mark the thread_info at the bottom of the stack
out of bounds anymore. This fixes it.
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 5207d5a405e2..ead5016b02d0 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -89,10 +89,14 @@ crit_transfer_to_handler: | |||
89 | mfspr r0,SPRN_SRR1 | 89 | mfspr r0,SPRN_SRR1 |
90 | stw r0,_SRR1(r11) | 90 | stw r0,_SRR1(r11) |
91 | 91 | ||
92 | /* set the stack limit to the current stack | ||
93 | * and set the limit to protect the thread_info | ||
94 | * struct | ||
95 | */ | ||
92 | mfspr r8,SPRN_SPRG_THREAD | 96 | mfspr r8,SPRN_SPRG_THREAD |
93 | lwz r0,KSP_LIMIT(r8) | 97 | lwz r0,KSP_LIMIT(r8) |
94 | stw r0,SAVED_KSP_LIMIT(r11) | 98 | stw r0,SAVED_KSP_LIMIT(r11) |
95 | CURRENT_THREAD_INFO(r0, r1) | 99 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) |
96 | stw r0,KSP_LIMIT(r8) | 100 | stw r0,KSP_LIMIT(r8) |
97 | /* fall through */ | 101 | /* fall through */ |
98 | #endif | 102 | #endif |
@@ -109,10 +113,14 @@ crit_transfer_to_handler: | |||
109 | mfspr r0,SPRN_SRR1 | 113 | mfspr r0,SPRN_SRR1 |
110 | stw r0,crit_srr1@l(0) | 114 | stw r0,crit_srr1@l(0) |
111 | 115 | ||
116 | /* set the stack limit to the current stack | ||
117 | * and set the limit to protect the thread_info | ||
118 | * struct | ||
119 | */ | ||
112 | mfspr r8,SPRN_SPRG_THREAD | 120 | mfspr r8,SPRN_SPRG_THREAD |
113 | lwz r0,KSP_LIMIT(r8) | 121 | lwz r0,KSP_LIMIT(r8) |
114 | stw r0,saved_ksp_limit@l(0) | 122 | stw r0,saved_ksp_limit@l(0) |
115 | CURRENT_THREAD_INFO(r0, r1) | 123 | rlwimi r0,r1,0,0,(31-THREAD_SHIFT) |
116 | stw r0,KSP_LIMIT(r8) | 124 | stw r0,KSP_LIMIT(r8) |
117 | /* fall through */ | 125 | /* fall through */ |
118 | #endif | 126 | #endif |