ppc32: fix perf_irq extern on e500
PATCH 1/1 ppc32: fix perf_irq extern on e500
Add an extern reference to perf_irq on e500.
arch/ppc/kernel/traps.c +2 -0
@@ -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);
Quoted 10 lines · Matt Porter
Add an extern reference to
perf_irqon e500.Signed-off-by Matt Porter <[email protected]>arch/ppc/kernel/traps.c +0
-0
arch/ppc/kernel/traps.c void altivec_assist_exception(struct pt_ · line 895
Quoted 8 lines
arch/ppc/kernel/traps.c +2
-0@@ -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.
Quoted 13 lines · Andrew Morton
Quoted 12 lines · Matt Porter
Add an extern reference to
perf_irqon e500.Signed-off-by Matt Porter <[email protected]>arch/ppc/kernel/traps.c +0
-0@@ -888,6 +888,8 @@ void altivec_assist_exception(struct pt_#endif /* CONFIG_ALTIVEC */
Quoted 8 lines
arch/ppc/kernel/traps.c void altivec_assist_exception(struct pt_ · line 895
Quoted 6 lines
arch/ppc/kernel/traps.c +2
-0#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
Quoted 3 lines · Andrew Morton
Quoted 2 lines · Matt Porter
Add an extern reference to
perf_irqon e500.
<snip>
Quoted 8 lines
Review
Quoted 6 lines
#ifdef
CONFIG_E500(quoted diff) +2
-0+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.
arch/powerpc/kernel/traps.c +0 -4
@@ -898,10 +898,6 @@ void altivec_unavailable_exception(strucdie ("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) {
include/asm-powerpc/pmc.h +1 -0
@@ -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 );
440EP FPU support missing
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
Re: 440EP FPU support missing
Quoted 11 lines · Stefan Roese
In the current linux version, Bamboo (440EP) won't compile anymore, because of missing fpu support:
make uImage
...
LDinit/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
Quoted 3 lines
Somehow
arch/ppc/kernel/fpu.Shas 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
arch/ppc/kernel/head_booke.h +1 -1
@@ -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__ */
Re: 440EP FPU support missing
In reply to Stefan RoeseQuoted 11 lines · Stefan Roese
In the current linux version, Bamboo (440EP) won't compile anymore, because of missing fpu support:
make uImage
...
LDinit/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
Quoted 3 lines
Somehow
arch/ppc/kernel/fpu.Shas 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.
Signature · 4 lines
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
Re: 440EP FPU support missing
In reply to Matt PorterQuoted 16 lines · Matt Porter
Quoted 11 lines · Stefan Roese
In the current linux version, Bamboo (440EP) won't compile anymore, because of missing fpu support:
make uImage
...
LDinit/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 1Quoted 3 lines
Somehow
arch/ppc/kernel/fpu.Shas 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)?
Quoted 6 lines
arch/powerpc/kernel/fpu.Sis being used now which doesn't have KernelFP. I don't know why the 44x fpu support wasn't usingkernel_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
Re: 440EP FPU support missing
In reply to David GibsonQuoted 12 lines · David Gibson
Quoted 11 lines · Stefan Roese
In the current linux version, Bamboo (440EP) won't compile anymore, because of missing fpu support:
make uImage
...
LDinit/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
Quoted 6 lines
Quoted 3 lines
Somehow
arch/ppc/kernel/fpu.Shas 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
Re: 440EP FPU support missing
In reply to Josh BoyerQuoted 17 lines · Josh Boyer
Quoted 16 lines · Matt Porter
Quoted 14 lines · Stefan Roese
In the current linux version, Bamboo (440EP) won't compile anymore, because of missing fpu support:
make uImage
...
LDinit/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 1Somehow
arch/ppc/kernel/fpu.Shas 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)?
Quoted 8 lines
Quoted 6 lines
arch/powerpc/kernel/fpu.Sis being used now which doesn't have KernelFP. I don't know why the 44x fpu support wasn't usingkernel_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
Re: 440EP FPU support missing
In reply to Matt PorterQuoted 20 lines · Matt Porter
Quoted 4 lines · Stefan Roese
Somehow
arch/ppc/kernel/fpu.Shas 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.Sis being used now which doesn't have KernelFP. I don't know why the 44x fpu support wasn't usingkernel_fp_unavailable_exception()before but I must have missed that reviewing it.Try this patch.
(quoted diff) +0
-1-Mattarch/ppc/kernel/head_booke.h +0
-0
arch/ppc/kernel/head_booke.h label: · line 363
Quoted 7 lines
arch/ppc/kernel/head_booke.h +1
-1@@ -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
Re: 440EP FPU support missing
In reply to Matt PorterQuoted 30 lines · Matt Porter
Quoted 17 lines · Josh Boyer
Quoted 16 lines · Matt Porter
Quoted 14 lines · Stefan Roese
In the current linux version, Bamboo (440EP) won't compile anymore, because of missing fpu support:
make uImage
...
LDinit/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 1Somehow
arch/ppc/kernel/fpu.Shas 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)?Quoted 8 lines
Quoted 6 lines
arch/powerpc/kernel/fpu.Sis being used now which doesn't have KernelFP. I don't know why the 44x fpu support wasn't usingkernel_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.
Quoted 8 lines
The patch simply replaces the KernelFP routine that used to be in
arch/ppc/kernel/fpu.S(and was removed inadvertently in thearch/powerpc/merge) with akernel_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