MPC85xx compile fixes
Subsystems (2)
cover MPC85xx compile fixes
While trying to compile a recent git kernel on my e500v2 box, I came across some pretty simple compilation bugs.
Since I have no idea which tree those go through, I'm sending them to you, but please coordinate who takes them in.
Also, it might be useful to set up a make defconfig machine that does regression testing for booke builds. These really shouldn't be caught by me in the kvm.git tree :).
Alexander Graf (3):
PPC: s/mtmsrd/MTMSR in ldstfp.S
PPC: Fix compilation of fsl_rio.c
PPC: Fix compilation of mpc85xx_mds.c
arch/powerpc/lib/ldstfp.S | 32 ++++++++++++++-------------- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 + arch/powerpc/sysdev/fsl_rio.c | 2 +- 3 files changed, 18 insertions(+), 17 deletions(-)
PATCH 1/3 PPC: s/mtmsrd/MTMSR in ldstfp.S
Commit 0016a4cf introduced a lot of mtmsrd's that were plainly written out. These failed to compile on my e500v2 system, so let's better use the macro that is around just for that purpose.
--- arch/powerpc/lib/ldstfp.S | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-)
arch/powerpc/lib/ldstfp.S +16 -16
@@ -81,7 +81,7 @@ _GLOBAL(do_lfs) mfmsr r6 ori r7,r6,MSR_FP cmpwi cr7,r3,0 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f stfd fr0,STKFRM-16(r1)
@@ -93,7 +93,7 @@ _GLOBAL(do_lfs) lfd fr0,STKFRM-16(r1) 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
@@ -108,7 +108,7 @@ _GLOBAL(do_lfd) mfmsr r6 ori r7,r6,MSR_FP cmpwi cr7,r3,0 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f stfd fr0,STKFRM-16(r1)
@@ -120,7 +120,7 @@ _GLOBAL(do_lfd) lfd fr0,STKFRM-16(r1) 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
@@ -135,7 +135,7 @@ _GLOBAL(do_stfs) mfmsr r6 ori r7,r6,MSR_FP cmpwi cr7,r3,0 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f stfd fr0,STKFRM-16(r1)
@@ -147,7 +147,7 @@ _GLOBAL(do_stfs) lfd fr0,STKFRM-16(r1) 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
@@ -162,7 +162,7 @@ _GLOBAL(do_stfd) mfmsr r6 ori r7,r6,MSR_FP cmpwi cr7,r3,0 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f stfd fr0,STKFRM-16(r1)
@@ -174,7 +174,7 @@ _GLOBAL(do_stfd) lfd fr0,STKFRM-16(r1) 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
@@ -229,7 +229,7 @@ _GLOBAL(do_lvx) oris r7,r6,MSR_VEC@h cmpwi cr7,r3,0 li r8,STKFRM-16 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f stvx vr0,r1,r8
@@ -241,7 +241,7 @@ _GLOBAL(do_lvx) lvx vr0,r1,r8 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
@@ -257,7 +257,7 @@ _GLOBAL(do_stvx) oris r7,r6,MSR_VEC@h cmpwi cr7,r3,0 li r8,STKFRM-16 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f stvx vr0,r1,r8
@@ -269,7 +269,7 @@ _GLOBAL(do_stvx) lvx vr0,r1,r8 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
@@ -325,7 +325,7 @@ _GLOBAL(do_lxvd2x) oris r7,r6,MSR_VSX@h cmpwi cr7,r3,0 li r8,STKFRM-16 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f STXVD2X(0,r1,r8)
@@ -337,7 +337,7 @@ _GLOBAL(do_lxvd2x) LXVD2X(0,r1,r8) 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
@@ -353,7 +353,7 @@ _GLOBAL(do_stxvd2x) oris r7,r6,MSR_VSX@h cmpwi cr7,r3,0 li r8,STKFRM-16 - mtmsrd r7 + MTMSRD(r7) isync beq cr7,1f STXVD2X(0,r1,r8)
@@ -365,7 +365,7 @@ _GLOBAL(do_stxvd2x) LXVD2X(0,r1,r8) 4: PPC_LL r0,STKFRM+PPC_LR_STKOFF(r1) mtlr r0 - mtmsrd r6 + MTMSRD(r6) isync mr r3,r9 addi r1,r1,STKFRM
Signature · 1 line
1.6.0.2
Re: [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S
Quoted 3 lines · On Tue, 31 Aug 2010 04:15:20 +0200 Alexander Graf <[email protected]> wrote:
Commit
0016a4cfintroduced a lot of mtmsrd's that were plainly written out. These failed to compile on my e500v2 system, so let's better use the macro that is around just for that purpose.
I sent in the same patch ;)
Cheers,
Sean
Re: [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S
Quoted 8 lines · Sean MacLennan
On Tue, 31 Aug 2010 04:15:20 +0200
Alexander Graf <[email protected]> wrote:
=20Quoted 3 lines
Commit
0016a4cfintroduced a lot of mtmsrd's that were plainly written out. These failed to compile on my e500v2 system, so let's better use the macro that is around just for that purpose.=20
I sent in the same patch ;)
I'm surprised we are compiling this code on e500v2. We are probably = missing some CONFIG_PPC_FPU in there as well.
- k=
PATCH 2/3 PPC: Fix compilation of fsl_rio.c
In reply to Alexander GrafCommit a52c8f52 introduced machine check magic for the RapidIO chip. Unfortunately it was so magical that it used constants that aren't even defined!
This patch bluntly comments out the broken constant's usage. This probably means that said functionality thus doesn't work, but at least it makes it compile for me.
--- arch/powerpc/sysdev/fsl_rio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/sysdev/fsl_rio.c +1 -1
@@ -245,7 +245,7 @@ static int (*saved_mcheck_exception)(struct pt_regs *regs);static int fsl_rio_mcheck_exception (struct pt_regs *regs) {const struct exception_table_entry *entry =NULL ; -unsigned long reason = (mfspr (SPRN_MCSR ) &MCSR_MASK ); +unsigned long reason = (mfspr (SPRN_MCSR )/* & MCSR_MASK */ );if (reason &MCSR_BUS_RBERR ) { reason =in_be32 ((u32 *)(rio_regs_win +RIO_LTLEDCSR ));
Signature · 1 line
1.6.0.2
Re: [PATCH 2/3] PPC: Fix compilation of fsl_rio.c
Quoted 7 lines · On Tue, 31 Aug 2010 04:15:21 +0200 Alexander Graf <[email protected]> wrote:
Commit
a52c8f52introduced machine check magic for the RapidIO chip. Unfortunately it was so magical that it used constants that aren't even defined!This patch bluntly comments out the broken constant's usage. This probably means that said functionality thus doesn't work, but at least it makes it compile for me.
The MCSR_MASK is actually completely unnecessary -- it doesn't change the result of testing bits that are within the mask.
Multiple patches have been posted for this already, including:
http://patchwork.ozlabs.org/patch/56135/
Someone just needs to apply it. :-)
-Scott
Re: [PATCH 2/3] PPC: Fix compilation of fsl_rio.c
Quoted 11 lines · Scott Wood
Quoted 7 lines · On Tue, 31 Aug 2010 04:15:21 +0200 Alexander Graf <[email protected]> wrote:
Commit
a52c8f52introduced machine check magic for the RapidIO chip. Unfortunately it was so magical that it used constants that aren't even defined!This patch bluntly comments out the broken constant's usage. This probably means that said functionality thus doesn't work, but at least it makes it compile for me.
Quoted 7 lines
The
MCSR_MASKis actually completely unnecessary -- it doesn't change the result of testing bits that are within the mask.Multiple patches have been posted for this already, including:
http://patchwork.ozlabs.org/patch/56135/Someone just needs to apply it. :-)
I've got a different version as I don't want to override the mcheck handler.
- k
PATCH 3/3 PPC: Fix compilation of mpc85xx_mds.c
In reply to Alexander GrafCommit 99d8238f berobbed the for_each loop of its iterator! Let's be nice and give it back, so it compiles for us.
--- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/powerpc/platforms/85xx/mpc85xx_mds.c +1 -0
@@ -357,6 +357,7 @@ static void __init mpc85xx_mds_setup_arch(void) {#ifdef CONFIG_PCI struct pci_controller *hose; +struct device_node *np;#endif dma_addr_t max =0xffffffff ;
Signature · 1 line
1.6.0.2
Kumar Gala
AppliedRe: [PATCH 3/3] PPC: Fix compilation of mpc85xx_mds.c
Quoted 8 lines · Alexander Graf
Commit
99d8238fberobbed thefor_eachloop of its iterator! Let's be nice and give it back, so it compiles for us.CC Anton Vorontsov <[email protected]>Signed-off-by Alexander Graf <[email protected]>---
arch/powerpc/platforms/85xx/mpc85xx_mds.c| 1 +1 files changed, 1 insertions(+), 0 deletions(-)
applied to merge
- k