提交 166e553a 编写于 作者: D David S. Miller

sparc64: Fix stack debugging IRQ stack regression.

Commit 4f70f7a9
(sparc64: Implement IRQ stacks.) has two bugs.

First, the softirq range check forgets to subtract STACK_BIAS
before comparing with %sp.  Next, on failure the wrong label
is jumped to, resulting in a bogus stack being loaded.
Reported-by: NIgor Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4230fa3b
...@@ -64,8 +64,9 @@ mcount: ...@@ -64,8 +64,9 @@ mcount:
2: sethi %hi(softirq_stack), %g3 2: sethi %hi(softirq_stack), %g3
or %g3, %lo(softirq_stack), %g3 or %g3, %lo(softirq_stack), %g3
ldx [%g3 + %g1], %g7 ldx [%g3 + %g1], %g7
sub %g7, STACK_BIAS, %g7
cmp %sp, %g7 cmp %sp, %g7
bleu,pt %xcc, 2f bleu,pt %xcc, 3f
sethi %hi(THREAD_SIZE), %g3 sethi %hi(THREAD_SIZE), %g3
add %g7, %g3, %g7 add %g7, %g3, %g7
cmp %sp, %g7 cmp %sp, %g7
...@@ -75,7 +76,7 @@ mcount: ...@@ -75,7 +76,7 @@ mcount:
* again, we are already trying to output the stack overflow * again, we are already trying to output the stack overflow
* message. * message.
*/ */
sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough 3: sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough
or %g7, %lo(ovstack), %g7 or %g7, %lo(ovstack), %g7
add %g7, OVSTACKSIZE, %g3 add %g7, OVSTACKSIZE, %g3
sub %g3, STACK_BIAS + 192, %g3 sub %g3, STACK_BIAS + 192, %g3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册