Howdy,
I found a couple places where a hardcoded value for the stack frame was
used instead of the STACK_FRAME_OVERHEAD macro. The following patch
fixes that.
thx,
josh
Signed-off-by: Josh Boyer <[email protected]>
diff -Naur linux-2.6.9-rc1/arch/ppc64/kernel/misc.S linux-2.6.9-rc1.jwb/arch/ppc64/kernel/misc.S
--- linux-2.6.9-rc1/arch/ppc64/kernel/misc.S 2004-08-14 00:37:40.000000000 -0500
+++ linux-2.6.9-rc1.jwb/arch/ppc64/kernel/misc.S 2004-09-09 18:07:56.038671384 -0500
@@ -107,7 +107,7 @@
_GLOBAL(call_do_softirq)
mflr r0
std r0,16(r1)
- stdu r1,THREAD_SIZE-112(r3)
+ stdu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r3)
mr r1,r3
bl .__do_softirq
ld r1,0(r1)
@@ -118,7 +118,7 @@
_GLOBAL(call_handle_irq_event)
mflr r0
std r0,16(r1)
- stdu r1,THREAD_SIZE-112(r6)
+ stdu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r6)
mr r1,r6
bl .handle_irq_event
ld r1,0(r1)
Josh Boyer writes:
> I found a couple places where a hardcoded value for the stack frame was
> used instead of the STACK_FRAME_OVERHEAD macro. The following patch
> fixes that.
Using STACK_FRAME_OVERHEAD here would be purely arbitrary (i.e. the
112 here has no connection with the stack frames established in head.S
and entry.S). This function needs a stack frame and 112 bytes is the
minimum size specified by the ABI. I think it's quite clear as it is.
Paul.
On Thu, 2004-09-09 at 18:33, Paul Mackerras wrote:
> Using STACK_FRAME_OVERHEAD here would be purely arbitrary (i.e. the
> 112 here has no connection with the stack frames established in head.S
> and entry.S). This function needs a stack frame and 112 bytes is the
> minimum size specified by the ABI. I think it's quite clear as it is.
Isn't STACK_FRAME_OVERHEAD supposed to mean exactly that, the minimum
stack size? Or is it just coincidence that the macro is defined to 112?
In any case, I was confused when I originally read it. If you prefer
112, that's fine by me now that I know what 112 means :).
thx,
josh