summaryrefslogtreecommitdiffstats
path: root/arch/sparc/lib/mcount.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-12-09 01:43:45 -0800
committerDavid S. Miller <davem@davemloft.net>2009-12-09 01:43:45 -0800
commit166e553a575f09485f6d0df8a1ef3c5991f7d953 (patch)
tree632e93d62c1d62d23f23e0c2a96b5270cbebd933 /arch/sparc/lib/mcount.S
parent4230fa3b89ea1c413766bd411a8315a3d05aa6c7 (diff)
downloadop-kernel-dev-166e553a575f09485f6d0df8a1ef3c5991f7d953.zip
op-kernel-dev-166e553a575f09485f6d0df8a1ef3c5991f7d953.tar.gz
sparc64: Fix stack debugging IRQ stack regression.
Commit 4f70f7a91bffdcc39f088748dc678953eb9a3fbd (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: Igor Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/lib/mcount.S')
-rw-r--r--arch/sparc/lib/mcount.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sparc/lib/mcount.S b/arch/sparc/lib/mcount.S
index 7ce9c65..24b8b12 100644
--- a/arch/sparc/lib/mcount.S
+++ b/arch/sparc/lib/mcount.S
@@ -64,8 +64,9 @@ mcount:
2: sethi %hi(softirq_stack), %g3
or %g3, %lo(softirq_stack), %g3
ldx [%g3 + %g1], %g7
+ sub %g7, STACK_BIAS, %g7
cmp %sp, %g7
- bleu,pt %xcc, 2f
+ bleu,pt %xcc, 3f
sethi %hi(THREAD_SIZE), %g3
add %g7, %g3, %g7
cmp %sp, %g7
@@ -75,7 +76,7 @@ mcount:
* again, we are already trying to output the stack overflow
* 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
add %g7, OVSTACKSIZE, %g3
sub %g3, STACK_BIAS + 192, %g3
OpenPOWER on IntegriCloud