[PATCH] powerpc/e5500: Set r5 to point to cpu spec in setup_cpu_e5500()

Scott Wood scottwood at freescale.com
Sat Sep 17 04:36:49 EST 2011


On 09/16/2011 10:37 AM, Kumar Gala wrote:
> From: Laurentiu Tudor <Laurentiu.Tudor at freescale.com>
> 
> e500mc and e5500 share some eary setup code that need r5 to point to the
> cpu spec structure.  setup_cpu_e500mc() sets it but setup_cpu_e5500()
> didn't.
> 
> This caused a crash on 32 bit e5500 running under hypervisor, when
> __setup_e500mc_ivors() tried to access the cpu features field.
> 
> Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor at freescale.com>
> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
> ---
>  arch/powerpc/kernel/cpu_setup_fsl_booke.S |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Unless I missed something going in recently, there's nothing in the
mainline kernel that uses r5 in __setup_e500mc_ivors().  This is a fix
for code that is currently just in our SDK, and should be combined with
that code when it is posted.  The interprocedural register allocation
could stand to be done more simply as well (why not just pick a
different register for lr, and leave r4 where it is?), and should be
documented.

-Scott



More information about the Linuxppc-dev mailing list