linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] MPC85xx compile fixes
@ 2010-08-31  2:15 Alexander Graf
  2010-08-31  2:15 ` [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S Alexander Graf
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alexander Graf @ 2010-08-31  2:15 UTC (permalink / raw)
  To: Linuxppc-dev

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(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S
  2010-08-31  2:15 [PATCH 0/3] MPC85xx compile fixes Alexander Graf
@ 2010-08-31  2:15 ` Alexander Graf
  2010-08-31  2:49   ` Sean MacLennan
  2010-08-31  2:15 ` [PATCH 2/3] PPC: Fix compilation of fsl_rio.c Alexander Graf
  2010-08-31  2:15 ` [PATCH 3/3] PPC: Fix compilation of mpc85xx_mds.c Alexander Graf
  2 siblings, 1 reply; 9+ messages in thread
From: Alexander Graf @ 2010-08-31  2:15 UTC (permalink / raw)
  To: Linuxppc-dev

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.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/lib/ldstfp.S |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/lib/ldstfp.S b/arch/powerpc/lib/ldstfp.S
index f644863..ce818a5 100644
--- a/arch/powerpc/lib/ldstfp.S
+++ b/arch/powerpc/lib/ldstfp.S
@@ -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
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] PPC: Fix compilation of fsl_rio.c
  2010-08-31  2:15 [PATCH 0/3] MPC85xx compile fixes Alexander Graf
  2010-08-31  2:15 ` [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S Alexander Graf
@ 2010-08-31  2:15 ` Alexander Graf
  2010-08-31 18:10   ` Scott Wood
  2010-08-31  2:15 ` [PATCH 3/3] PPC: Fix compilation of mpc85xx_mds.c Alexander Graf
  2 siblings, 1 reply; 9+ messages in thread
From: Alexander Graf @ 2010-08-31  2:15 UTC (permalink / raw)
  To: Linuxppc-dev; +Cc: Alexandre Bounine, Thomas Moll

Commit 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.

CC: Alexandre Bounine <alexandre.bounine@idt.com>
CC: Thomas Moll <thomas.moll@sysgo.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/sysdev/fsl_rio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 6425abe..dba2969 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -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));
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] PPC: Fix compilation of mpc85xx_mds.c
  2010-08-31  2:15 [PATCH 0/3] MPC85xx compile fixes Alexander Graf
  2010-08-31  2:15 ` [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S Alexander Graf
  2010-08-31  2:15 ` [PATCH 2/3] PPC: Fix compilation of fsl_rio.c Alexander Graf
@ 2010-08-31  2:15 ` Alexander Graf
  2010-08-31 21:24   ` Kumar Gala
  2 siblings, 1 reply; 9+ messages in thread
From: Alexander Graf @ 2010-08-31  2:15 UTC (permalink / raw)
  To: Linuxppc-dev; +Cc: Anton Vorontsov

Commit 99d8238f berobbed the for_each loop of its iterator! Let's be
nice and give it back, so it compiles for us.

CC: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/platforms/85xx/mpc85xx_mds.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index da64be1..aa34cac 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -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;
 
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S
  2010-08-31  2:15 ` [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S Alexander Graf
@ 2010-08-31  2:49   ` Sean MacLennan
  2010-08-31  4:37     ` Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Sean MacLennan @ 2010-08-31  2:49 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Linuxppc-dev

On Tue, 31 Aug 2010 04:15:20 +0200
Alexander Graf <agraf@suse.de> wrote:

> 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.

I sent in the same patch ;)

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S
  2010-08-31  2:49   ` Sean MacLennan
@ 2010-08-31  4:37     ` Kumar Gala
  0 siblings, 0 replies; 9+ messages in thread
From: Kumar Gala @ 2010-08-31  4:37 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: Linuxppc-dev, Alexander Graf


On Aug 30, 2010, at 9:49 PM, Sean MacLennan wrote:

> On Tue, 31 Aug 2010 04:15:20 +0200
> Alexander Graf <agraf@suse.de> wrote:
>=20
>> 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.
>=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=

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] PPC: Fix compilation of fsl_rio.c
  2010-08-31  2:15 ` [PATCH 2/3] PPC: Fix compilation of fsl_rio.c Alexander Graf
@ 2010-08-31 18:10   ` Scott Wood
  2010-08-31 18:55     ` Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2010-08-31 18:10 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Linuxppc-dev, Thomas Moll, Alexandre Bounine

On Tue, 31 Aug 2010 04:15:21 +0200
Alexander Graf <agraf@suse.de> wrote:

> Commit 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.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] PPC: Fix compilation of fsl_rio.c
  2010-08-31 18:10   ` Scott Wood
@ 2010-08-31 18:55     ` Kumar Gala
  0 siblings, 0 replies; 9+ messages in thread
From: Kumar Gala @ 2010-08-31 18:55 UTC (permalink / raw)
  To: Scott Wood; +Cc: Linuxppc-dev, Alexandre Bounine, Alexander Graf, Thomas Moll


On Aug 31, 2010, at 1:10 PM, Scott Wood wrote:

> On Tue, 31 Aug 2010 04:15:21 +0200
> Alexander Graf <agraf@suse.de> wrote:
> 
>> Commit 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.
> 
> 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. :-)

I've got a different version as I don't want to override the mcheck handler.

- k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] PPC: Fix compilation of mpc85xx_mds.c
  2010-08-31  2:15 ` [PATCH 3/3] PPC: Fix compilation of mpc85xx_mds.c Alexander Graf
@ 2010-08-31 21:24   ` Kumar Gala
  0 siblings, 0 replies; 9+ messages in thread
From: Kumar Gala @ 2010-08-31 21:24 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Linuxppc-dev, Anton Vorontsov


On Aug 30, 2010, at 9:15 PM, Alexander Graf wrote:

> Commit 99d8238f berobbed the for_each loop of its iterator! Let's be
> nice and give it back, so it compiles for us.
> 
> CC: Anton Vorontsov <avorontsov@mvista.com>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/platforms/85xx/mpc85xx_mds.c |    1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)

applied to merge

- k

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-08-31 21:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-31  2:15 [PATCH 0/3] MPC85xx compile fixes Alexander Graf
2010-08-31  2:15 ` [PATCH 1/3] PPC: s/mtmsrd/MTMSR in ldstfp.S Alexander Graf
2010-08-31  2:49   ` Sean MacLennan
2010-08-31  4:37     ` Kumar Gala
2010-08-31  2:15 ` [PATCH 2/3] PPC: Fix compilation of fsl_rio.c Alexander Graf
2010-08-31 18:10   ` Scott Wood
2010-08-31 18:55     ` Kumar Gala
2010-08-31  2:15 ` [PATCH 3/3] PPC: Fix compilation of mpc85xx_mds.c Alexander Graf
2010-08-31 21:24   ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).