linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppc32: fix perf_irq extern on e500
@ 2005-11-07 19:49 Matt Porter
  2005-11-08  3:01 ` Andrew Morton
  0 siblings, 1 reply; 12+ messages in thread
From: Matt Porter @ 2005-11-07 19:49 UTC (permalink / raw)
  To: akpm; +Cc: linuxppc-embedded

Add an extern reference to perf_irq on e500.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>

diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index 16adde6..ff1bdc2 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -888,6 +888,8 @@ void altivec_assist_exception(struct pt_
 #endif /* CONFIG_ALTIVEC */
 
 #ifdef CONFIG_E500
+extern perf_irq_t perf_irq;
+
 void performance_monitor_exception(struct pt_regs *regs)
 {
 	perf_irq(regs);

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

* Re: [PATCH] ppc32: fix perf_irq extern on e500
  2005-11-07 19:49 [PATCH] ppc32: fix perf_irq extern on e500 Matt Porter
@ 2005-11-08  3:01 ` Andrew Morton
  2005-11-08  4:35   ` Matt Porter
  2005-11-08 16:37   ` Matt Porter
  0 siblings, 2 replies; 12+ messages in thread
From: Andrew Morton @ 2005-11-08  3:01 UTC (permalink / raw)
  To: Matt Porter; +Cc: linuxppc-embedded

Matt Porter <mporter@kernel.crashing.org> wrote:
>
> Add an extern reference to perf_irq on e500.
> 
> Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
> 
> diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
> index 16adde6..ff1bdc2 100644
> --- a/arch/ppc/kernel/traps.c
> +++ b/arch/ppc/kernel/traps.c
> @@ -888,6 +888,8 @@ void altivec_assist_exception(struct pt_
>  #endif /* CONFIG_ALTIVEC */
>  
>  #ifdef CONFIG_E500
> +extern perf_irq_t perf_irq;
> +
>  void performance_monitor_exception(struct pt_regs *regs)
>  {
>  	perf_irq(regs);

extern decls are placed in header files, please.  

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

* Re: [PATCH] ppc32: fix perf_irq extern on e500
  2005-11-08  3:01 ` Andrew Morton
@ 2005-11-08  4:35   ` Matt Porter
  2005-11-08 16:37   ` Matt Porter
  1 sibling, 0 replies; 12+ messages in thread
From: Matt Porter @ 2005-11-08  4:35 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linuxppc-embedded

On Mon, Nov 07, 2005 at 07:01:28PM -0800, Andrew Morton wrote:
> Matt Porter <mporter@kernel.crashing.org> wrote:
> >
> > Add an extern reference to perf_irq on e500.
> > 
> > Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
> > 
> > diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
> > index 16adde6..ff1bdc2 100644
> > --- a/arch/ppc/kernel/traps.c
> > +++ b/arch/ppc/kernel/traps.c
> > @@ -888,6 +888,8 @@ void altivec_assist_exception(struct pt_
> >  #endif /* CONFIG_ALTIVEC */
> >  
> >  #ifdef CONFIG_E500
> > +extern perf_irq_t perf_irq;
> > +
> >  void performance_monitor_exception(struct pt_regs *regs)
> >  {
> >  	perf_irq(regs);
> 
> extern decls are placed in header files, please.  

Ok, but we'll have to fix the equivalent code in arch/powerpc/.
The problem is that these rules are applied inconsistently at best. :)

-Matt

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

* Re: [PATCH] ppc32: fix perf_irq extern on e500
  2005-11-08  3:01 ` Andrew Morton
  2005-11-08  4:35   ` Matt Porter
@ 2005-11-08 16:37   ` Matt Porter
  2005-11-08 17:38     ` 440EP FPU support missing Stefan Roese
  1 sibling, 1 reply; 12+ messages in thread
From: Matt Porter @ 2005-11-08 16:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linuxppc64-dev, paulus, linuxppc-embedded

On Mon, Nov 07, 2005 at 07:01:28PM -0800, Andrew Morton wrote:
> Matt Porter <mporter@kernel.crashing.org> wrote:
> >
> > Add an extern reference to perf_irq on e500.

<snip>

> >  #ifdef CONFIG_E500
> > +extern perf_irq_t perf_irq;
> > +
> >  void performance_monitor_exception(struct pt_regs *regs)
> >  {
> >  	perf_irq(regs);
> 
> extern decls are placed in header files, please.  

Here's the updated patch, addressing this for ppc64 as well.  Paul,
would you prefer that this go through the powerpc-merge tree since
the updated version modifies arch/powerpc/?

-Matt

Fixes e500 build and cleans up traps.c by moving perf_irq extern to
pmc.h.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 07e5ee4..32cd797 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -898,10 +898,6 @@ void altivec_unavailable_exception(struc
 	die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT);
 }
 
-#ifdef CONFIG_PPC64
-extern perf_irq_t perf_irq;
-#endif
-
 #if defined(CONFIG_PPC64) || defined(CONFIG_E500)
 void performance_monitor_exception(struct pt_regs *regs)
 {
diff --git a/include/asm-powerpc/pmc.h b/include/asm-powerpc/pmc.h
index 2f3c3fc..5f41f3a 100644
--- a/include/asm-powerpc/pmc.h
+++ b/include/asm-powerpc/pmc.h
@@ -22,6 +22,7 @@
 #include <asm/ptrace.h>
 
 typedef void (*perf_irq_t)(struct pt_regs *);
+extern perf_irq_t perf_irq;
 
 int reserve_pmc_hardware(perf_irq_t new_perf_irq);
 void release_pmc_hardware(void);

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

* 440EP FPU support missing
  2005-11-08 16:37   ` Matt Porter
@ 2005-11-08 17:38     ` Stefan Roese
  2005-11-08 22:30       ` Matt Porter
  2005-11-08 22:32       ` David Gibson
  0 siblings, 2 replies; 12+ messages in thread
From: Stefan Roese @ 2005-11-08 17:38 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linuxppc64-dev

In the current linux version, Bamboo (440EP) won't compile anymore, because of 
missing fpu support:

make uImage
...
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
: undefined reference to `KernelFP'
make: *** [.tmp_vmlinux1] Error 1

Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in 
the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and 
how to solve this problem (just restore the original file)?

Best regards,
Stefan

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

* Re: 440EP FPU support missing
  2005-11-08 17:38     ` 440EP FPU support missing Stefan Roese
@ 2005-11-08 22:30       ` Matt Porter
  2005-11-08 22:32         ` Josh Boyer
  2005-11-09  9:47         ` Stefan Roese
  2005-11-08 22:32       ` David Gibson
  1 sibling, 2 replies; 12+ messages in thread
From: Matt Porter @ 2005-11-08 22:30 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev, linuxppc64-dev

On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> In the current linux version, Bamboo (440EP) won't compile anymore, because of 
> missing fpu support:
> 
> make uImage
> ...
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> : undefined reference to `KernelFP'
> make: *** [.tmp_vmlinux1] Error 1
> 
> Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in 
> the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and 
> how to solve this problem (just restore the original file)?

arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
I don't know why the 44x fpu support wasn't using
kernel_fp_unavailable_exception() before but I must have missed that
reviewing it.

Try this patch.

-Matt

diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h
index aeb349b..f3d274c 100644
--- a/arch/ppc/kernel/head_booke.h
+++ b/arch/ppc/kernel/head_booke.h
@@ -358,6 +358,6 @@ label:
 	NORMAL_EXCEPTION_PROLOG;					      \
 	bne	load_up_fpu;		/* if from user, just load it up */   \
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
-	EXC_XFER_EE_LITE(0x800, KernelFP)
+	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 #endif /* __HEAD_BOOKE_H__ */

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

* Re: 440EP FPU support missing
  2005-11-08 17:38     ` 440EP FPU support missing Stefan Roese
  2005-11-08 22:30       ` Matt Porter
@ 2005-11-08 22:32       ` David Gibson
  2005-11-08 22:46         ` Matt Porter
  1 sibling, 1 reply; 12+ messages in thread
From: David Gibson @ 2005-11-08 22:32 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev, linuxppc64-dev

On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> In the current linux version, Bamboo (440EP) won't compile anymore, because of 
> missing fpu support:
> 
> make uImage
> ...
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> : undefined reference to `KernelFP'
> make: *** [.tmp_vmlinux1] Error 1
> 
> Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in 
> the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and 
> how to solve this problem (just restore the original file)?

It's just moved to arch/powerpc/kernel/fpu.S.  All you should need is
to tweak the Makefiles so that it's included in your build.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: 440EP FPU support missing
  2005-11-08 22:30       ` Matt Porter
@ 2005-11-08 22:32         ` Josh Boyer
  2005-11-08 23:02           ` Matt Porter
  2005-11-09  9:47         ` Stefan Roese
  1 sibling, 1 reply; 12+ messages in thread
From: Josh Boyer @ 2005-11-08 22:32 UTC (permalink / raw)
  To: Matt Porter; +Cc: linuxppc-dev, Stefan Roese, linuxppc64-dev

On Tue, 2005-11-08 at 15:30 -0700, Matt Porter wrote:
> On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > In the current linux version, Bamboo (440EP) won't compile anymore, because of 
> > missing fpu support:
> > 
> > make uImage
> > ...
> >   LD      init/built-in.o
> >   LD      .tmp_vmlinux1
> > arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> > : undefined reference to `KernelFP'
> > make: *** [.tmp_vmlinux1] Error 1
> > 
> > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in 
> > the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and 
> > how to solve this problem (just restore the original file)?
> 
> arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
> I don't know why the 44x fpu support wasn't using
> kernel_fp_unavailable_exception() before but I must have missed that
> reviewing it.
> 
> Try this patch.

Doesn't this render the 440EP's FPU useless?

josh

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

* Re: 440EP FPU support missing
  2005-11-08 22:32       ` David Gibson
@ 2005-11-08 22:46         ` Matt Porter
  0 siblings, 0 replies; 12+ messages in thread
From: Matt Porter @ 2005-11-08 22:46 UTC (permalink / raw)
  To: Stefan Roese, linuxppc-dev, linuxppc64-dev

On Wed, Nov 09, 2005 at 09:32:02AM +1100, David Gibson wrote:
> On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > In the current linux version, Bamboo (440EP) won't compile anymore, because of 
> > missing fpu support:
> > 
> > make uImage
> > ...
> >   LD      init/built-in.o
> >   LD      .tmp_vmlinux1
> > arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> > : undefined reference to `KernelFP'
> > make: *** [.tmp_vmlinux1] Error 1
> > 
> > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in 
> > the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and 
> > how to solve this problem (just restore the original file)?
> 
> It's just moved to arch/powerpc/kernel/fpu.S.  All you should need is
> to tweak the Makefiles so that it's included in your build.

Actually, the version in arch/powerpc/kernel/ is older than the version
removed from arch/ppc/kernel/. It is already being built...see my other
post.

-Matt

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

* Re: 440EP FPU support missing
  2005-11-08 22:32         ` Josh Boyer
@ 2005-11-08 23:02           ` Matt Porter
  2005-11-09 16:50             ` Josh Boyer
  0 siblings, 1 reply; 12+ messages in thread
From: Matt Porter @ 2005-11-08 23:02 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, Stefan Roese, linuxppc64-dev

On Tue, Nov 08, 2005 at 04:32:54PM -0600, Josh Boyer wrote:
> On Tue, 2005-11-08 at 15:30 -0700, Matt Porter wrote:
> > On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > > In the current linux version, Bamboo (440EP) won't compile anymore, because of 
> > > missing fpu support:
> > > 
> > > make uImage
> > > ...
> > >   LD      init/built-in.o
> > >   LD      .tmp_vmlinux1
> > > arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> > > : undefined reference to `KernelFP'
> > > make: *** [.tmp_vmlinux1] Error 1
> > > 
> > > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in 
> > > the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and 
> > > how to solve this problem (just restore the original file)?
> > 
> > arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
> > I don't know why the 44x fpu support wasn't using
> > kernel_fp_unavailable_exception() before but I must have missed that
> > reviewing it.
> > 
> > Try this patch.
> 
> Doesn't this render the 440EP's FPU useless?
 
Does what render the 440EP's FPU useless? The supplied patch? I
don't think so, the path should be the same as classic PPC.

The patch simply replaces the KernelFP routine that used to be in
arch/ppc/kernel/fpu.S (and was removed inadvertently in the arch/powerpc/
merge) with a kernel_fp_unavailable_exception() call which does the
equivalent and is shared by others.

The exception still loads up the fpu is coming from userspace and
only goes down this path when getting an FP unavailable exception from
kernel space.

-Matt

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

* Re: 440EP FPU support missing
  2005-11-08 22:30       ` Matt Porter
  2005-11-08 22:32         ` Josh Boyer
@ 2005-11-09  9:47         ` Stefan Roese
  1 sibling, 0 replies; 12+ messages in thread
From: Stefan Roese @ 2005-11-09  9:47 UTC (permalink / raw)
  To: Matt Porter; +Cc: linuxppc-dev, linuxppc64-dev

On Tuesday 08 November 2005 23:30, Matt Porter wrote:
> On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this
> > happened in the ppc/ppc64 -> powerpc merge. Any thoughts, why this file
> > disappeared and how to solve this problem (just restore the original
> > file)?
>
> arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
> I don't know why the 44x fpu support wasn't using
> kernel_fp_unavailable_exception() before but I must have missed that
> reviewing it.
>
> Try this patch.
>
> -Matt
>
> diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h
> index aeb349b..f3d274c 100644
> --- a/arch/ppc/kernel/head_booke.h
> +++ b/arch/ppc/kernel/head_booke.h
> @@ -358,6 +358,6 @@ label:
>  	NORMAL_EXCEPTION_PROLOG;					      \
>  	bne	load_up_fpu;		/* if from user, just load it up */   \
>  	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
> -	EXC_XFER_EE_LITE(0x800, KernelFP)
> +	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
>
>  #endif /* __HEAD_BOOKE_H__ */

Thanks Matt. That fixes the problem. Please send this patch upstream.

Best regards,
Stefan

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

* Re: 440EP FPU support missing
  2005-11-08 23:02           ` Matt Porter
@ 2005-11-09 16:50             ` Josh Boyer
  0 siblings, 0 replies; 12+ messages in thread
From: Josh Boyer @ 2005-11-09 16:50 UTC (permalink / raw)
  To: Matt Porter; +Cc: linuxppc-dev, Stefan Roese, linuxppc64-dev

On Tue, 2005-11-08 at 16:02 -0700, Matt Porter wrote:
> On Tue, Nov 08, 2005 at 04:32:54PM -0600, Josh Boyer wrote:
> > On Tue, 2005-11-08 at 15:30 -0700, Matt Porter wrote:
> > > On Tue, Nov 08, 2005 at 06:38:11PM +0100, Stefan Roese wrote:
> > > > In the current linux version, Bamboo (440EP) won't compile anymore, because of 
> > > > missing fpu support:
> > > > 
> > > > make uImage
> > > > ...
> > > >   LD      init/built-in.o
> > > >   LD      .tmp_vmlinux1
> > > > arch/ppc/kernel/head_44x.o(.text+0x868): In function `_start':
> > > > : undefined reference to `KernelFP'
> > > > make: *** [.tmp_vmlinux1] Error 1
> > > > 
> > > > Somehow arch/ppc/kernel/fpu.S has disappeared. :-( I assume, this happened in 
> > > > the ppc/ppc64 -> powerpc merge. Any thoughts, why this file disappeared and 
> > > > how to solve this problem (just restore the original file)?
> > > 
> > > arch/powerpc/kernel/fpu.S is being used now which doesn't have KernelFP.
> > > I don't know why the 44x fpu support wasn't using
> > > kernel_fp_unavailable_exception() before but I must have missed that
> > > reviewing it.
> > > 
> > > Try this patch.
> > 
> > Doesn't this render the 440EP's FPU useless?
>  
> Does what render the 440EP's FPU useless? The supplied patch? I
> don't think so, the path should be the same as classic PPC.
> 
> The patch simply replaces the KernelFP routine that used to be in
> arch/ppc/kernel/fpu.S (and was removed inadvertently in the arch/powerpc/
> merge) with a kernel_fp_unavailable_exception() call which does the
> equivalent and is shared by others.
> 
> The exception still loads up the fpu is coming from userspace and
> only goes down this path when getting an FP unavailable exception from
> kernel space.

Yes, you're obviously right.  I blame my idiocy on lack of coffee.
Sorry for the noise.

josh

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

end of thread, other threads:[~2005-11-09 16:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-07 19:49 [PATCH] ppc32: fix perf_irq extern on e500 Matt Porter
2005-11-08  3:01 ` Andrew Morton
2005-11-08  4:35   ` Matt Porter
2005-11-08 16:37   ` Matt Porter
2005-11-08 17:38     ` 440EP FPU support missing Stefan Roese
2005-11-08 22:30       ` Matt Porter
2005-11-08 22:32         ` Josh Boyer
2005-11-08 23:02           ` Matt Porter
2005-11-09 16:50             ` Josh Boyer
2005-11-09  9:47         ` Stefan Roese
2005-11-08 22:32       ` David Gibson
2005-11-08 22:46         ` Matt Porter

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