aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/lib
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-12 18:33:56 -0700
committerDavid S. Miller <davem@davemloft.net>2008-08-12 18:33:56 -0700
commit4f70f7a91bffdcc39f088748dc678953eb9a3fbd (patch)
tree934591a9518fbed87c14b758a1744cc30c9dfbb8 /arch/sparc64/lib
parente34456825de0d3ac4c4e8fe0bdc6b599404ea06f (diff)
sparc64: Implement IRQ stacks.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/lib')
-rw-r--r--arch/sparc64/lib/mcount.S22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/sparc64/lib/mcount.S b/arch/sparc64/lib/mcount.S
index 734caf0cec0..fad90ddb3a2 100644
--- a/arch/sparc64/lib/mcount.S
+++ b/arch/sparc64/lib/mcount.S
@@ -49,6 +49,28 @@ mcount:
cmp %sp, %g3
bg,pt %xcc, 1f
nop
+ lduh [%g6 + TI_CPU], %g1
+ sethi %hi(hardirq_stack), %g3
+ or %g3, %lo(hardirq_stack), %g3
+ sllx %g1, 3, %g1
+ ldx [%g3 + %g1], %g7
+ sub %g7, STACK_BIAS, %g7
+ cmp %sp, %g7
+ bleu,pt %xcc, 2f
+ sethi %hi(THREAD_SIZE), %g3
+ add %g7, %g3, %g7
+ cmp %sp, %g7
+ blu,pn %xcc, 1f
+2: sethi %hi(softirq_stack), %g3
+ or %g3, %lo(softirq_stack), %g3
+ ldx [%g3 + %g1], %g7
+ cmp %sp, %g7
+ bleu,pt %xcc, 2f
+ sethi %hi(THREAD_SIZE), %g3
+ add %g7, %g3, %g7
+ cmp %sp, %g7
+ blu,pn %xcc, 1f
+ nop
/* If we are already on ovstack, don't hop onto it
* again, we are already trying to output the stack overflow
* message.