diff mbox series

[1/3] xen/ppc: Fix stack initialization in head.S

Message ID 4d733b1f17215616b7ab00f0e44d2f483436b1d6.1695942864.git.sanastasio@raptorengineering.com (mailing list archive)
State Superseded
Headers show
Series Early exception handlers on Power | expand

Commit Message

Shawn Anastasio Sept. 28, 2023, 11:19 p.m. UTC
The code to set up the stack in head.S erroneously loads the bottom of
the stack (the symbol cpu0_boot_stack) into r1 instead of the top of the
stack (cpu0_boot_stack + STACK_SIZE).

Fixes: 3a4e6f67bc68 ("xen/ppc: Set up a basic C environment")
Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
---
 xen/arch/ppc/ppc64/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Cooper Sept. 29, 2023, 9:15 a.m. UTC | #1
On 29/09/2023 12:19 am, Shawn Anastasio wrote:
> The code to set up the stack in head.S erroneously loads the bottom of
> the stack (the symbol cpu0_boot_stack) into r1 instead of the top of the
> stack (cpu0_boot_stack + STACK_SIZE).
>
> Fixes: 3a4e6f67bc68 ("xen/ppc: Set up a basic C environment")
> Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

We're in code freeze for 4.18 now.  Bugfixes are still fine, and this
one does want including IMO.  CC Henry.
Henry Wang Sept. 29, 2023, 9:18 a.m. UTC | #2
Hi Andrew, Shawn,

> On Sep 29, 2023, at 17:15, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> 
> On 29/09/2023 12:19 am, Shawn Anastasio wrote:
>> The code to set up the stack in head.S erroneously loads the bottom of
>> the stack (the symbol cpu0_boot_stack) into r1 instead of the top of the
>> stack (cpu0_boot_stack + STACK_SIZE).
>> 
>> Fixes: 3a4e6f67bc68 ("xen/ppc: Set up a basic C environment")
>> Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
> 
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> We're in code freeze for 4.18 now.  Bugfixes are still fine, and this
> one does want including IMO.

Indeed, so:

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

> CC Henry.

Thanks!

Kind regards,
Henry
diff mbox series

Patch

diff --git a/xen/arch/ppc/ppc64/head.S b/xen/arch/ppc/ppc64/head.S
index e600ddb05f..6ce313aff8 100644
--- a/xen/arch/ppc/ppc64/head.S
+++ b/xen/arch/ppc/ppc64/head.S
@@ -46,7 +46,7 @@  ENTRY(start)
 .L_correct_address:
 
     /* set up the initial stack */
-    LOAD_REG_ADDR(%r1, cpu0_boot_stack)
+    LOAD_REG_ADDR(%r1, cpu0_boot_stack + STACK_SIZE)
     li      %r11, 0
     stdu    %r11, -STACK_FRAME_OVERHEAD(%r1)