* [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
@ 2015-09-03 9:27 Christophe Leroy
2015-09-03 9:47 ` Michael Ellerman
2015-09-04 16:43 ` Scott Wood
0 siblings, 2 replies; 8+ messages in thread
From: Christophe Leroy @ 2015-09-03 9:27 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
scottwood
Cc: linux-kernel, linuxppc-dev, Joakim Tjernlund
On PPC832x, perf record/report reports martian addresses
2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send
2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb
1.62% perf_reseau4 [kernel.kallsyms] [k] __ip_append_data.isra.39
1.55% perf_reseau4 [kernel.kallsyms] [k] ip_finish_output
1.33% perf_reseau4 [unknown] [k] 0x7ffffd94
1.33% perf_reseau4 [unknown] [k] 0x7ffffd95
1.28% perf_reseau4 [unknown] [k] 0x7ffffd97
1.26% perf_reseau4 [unknown] [k] 0x7ffffda3
1.24% perf_reseau4 [unknown] [k] 0x7ffffd98
1.22% perf_reseau4 [unknown] [k] 0x7ffffd92
1.22% perf_reseau4 [unknown] [k] 0x7ffffd9b
[.....]
This is due to function perf_instruction_pointer() reading SPR SIAR
which doesn't exist on e300 core. The perf_instruction_pointer() is
redefined in arch/powerpc/perf/core-book3s.c when CONFIG_PPC_PERF_CTRS
is selected.
This patch moves the selection of CONFIG_PPC_HAVE_PMU in 86xx section
so that CONFIG_PPC_PERF_CTRS won't be selected for other 6xx powerpc
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/platforms/86xx/Kconfig | 1 +
arch/powerpc/platforms/Kconfig.cputype | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 1afd1e4..bb24d2a 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -5,6 +5,7 @@ menuconfig PPC_86xx
select FSL_SOC
select ALTIVEC
select ARCH_WANT_OPTIONAL_GPIOLIB
+ select PPC_HAVE_PMU_SUPPORT
help
The Freescale E600 SoCs have 74xx cores.
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index d642cf9..aa63b12 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -143,7 +143,6 @@ config PPC_BOOK3E
config 6xx
def_bool y
depends on PPC32 && PPC_BOOK3S
- select PPC_HAVE_PMU_SUPPORT
config TUNE_CELL
bool "Optimize for Cell Broadband Engine"
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
2015-09-03 9:27 [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600 Christophe Leroy
@ 2015-09-03 9:47 ` Michael Ellerman
2015-09-04 16:43 ` Scott Wood
1 sibling, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2015-09-03 9:47 UTC (permalink / raw)
To: Christophe Leroy
Cc: Benjamin Herrenschmidt, Paul Mackerras, scottwood, linux-kernel,
linuxppc-dev, Joakim Tjernlund
On Thu, 2015-09-03 at 11:27 +0200, Christophe Leroy wrote:
> On PPC832x, perf record/report reports martian addresses
>
> 2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send
> 2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb
> 1.62% perf_reseau4 [kernel.kallsyms] [k] __ip_append_data.isra.39
> 1.55% perf_reseau4 [kernel.kallsyms] [k] ip_finish_output
> 1.33% perf_reseau4 [unknown] [k] 0x7ffffd94
> 1.33% perf_reseau4 [unknown] [k] 0x7ffffd95
> 1.28% perf_reseau4 [unknown] [k] 0x7ffffd97
> 1.26% perf_reseau4 [unknown] [k] 0x7ffffda3
> 1.24% perf_reseau4 [unknown] [k] 0x7ffffd98
> 1.22% perf_reseau4 [unknown] [k] 0x7ffffd92
> 1.22% perf_reseau4 [unknown] [k] 0x7ffffd9b
> [.....]
>
> This is due to function perf_instruction_pointer() reading SPR SIAR
> which doesn't exist on e300 core. The perf_instruction_pointer() is
> redefined in arch/powerpc/perf/core-book3s.c when CONFIG_PPC_PERF_CTRS
> is selected.
>
> This patch moves the selection of CONFIG_PPC_HAVE_PMU in 86xx section
> so that CONFIG_PPC_PERF_CTRS won't be selected for other 6xx powerpc
I don't know much about these old 6xx cpus, deferring to Paul.
cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
2015-09-03 9:27 [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600 Christophe Leroy
2015-09-03 9:47 ` Michael Ellerman
@ 2015-09-04 16:43 ` Scott Wood
2015-09-04 18:00 ` christophe leroy
1 sibling, 1 reply; 8+ messages in thread
From: Scott Wood @ 2015-09-04 16:43 UTC (permalink / raw)
To: Christophe Leroy
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
linux-kernel, linuxppc-dev, Joakim Tjernlund
On Thu, Sep 03, 2015 at 11:27:03AM +0200, Christophe Leroy wrote:
> On PPC832x, perf record/report reports martian addresses
>
> 2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send
> 2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb
> 1.62% perf_reseau4 [kernel.kallsyms] [k] __ip_append_data.isra.39
> 1.55% perf_reseau4 [kernel.kallsyms] [k] ip_finish_output
> 1.33% perf_reseau4 [unknown] [k] 0x7ffffd94
> 1.33% perf_reseau4 [unknown] [k] 0x7ffffd95
> 1.28% perf_reseau4 [unknown] [k] 0x7ffffd97
> 1.26% perf_reseau4 [unknown] [k] 0x7ffffda3
> 1.24% perf_reseau4 [unknown] [k] 0x7ffffd98
> 1.22% perf_reseau4 [unknown] [k] 0x7ffffd92
> 1.22% perf_reseau4 [unknown] [k] 0x7ffffd9b
> [.....]
>
> This is due to function perf_instruction_pointer() reading SPR SIAR
> which doesn't exist on e300 core. The perf_instruction_pointer() is
> redefined in arch/powerpc/perf/core-book3s.c when CONFIG_PPC_PERF_CTRS
> is selected.
>
> This patch moves the selection of CONFIG_PPC_HAVE_PMU in 86xx section
> so that CONFIG_PPC_PERF_CTRS won't be selected for other 6xx powerpc
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
So, what happens when a kernel is built that supports both 83xx and 86xx?
Plus, it's e300, not e600, that is the exception among 6xx-style cores.
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
2015-09-04 16:43 ` Scott Wood
@ 2015-09-04 18:00 ` christophe leroy
2015-09-04 18:31 ` Segher Boessenkool
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: christophe leroy @ 2015-09-04 18:00 UTC (permalink / raw)
To: Scott Wood
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
linux-kernel, linuxppc-dev, Joakim Tjernlund
Le 04/09/2015 18:43, Scott Wood a écrit :
> On Thu, Sep 03, 2015 at 11:27:03AM +0200, Christophe Leroy wrote:
>> On PPC832x, perf record/report reports martian addresses
>>
>> 2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send
>> 2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb
>> 1.62% perf_reseau4 [kernel.kallsyms] [k] __ip_append_data.isra.39
>> 1.55% perf_reseau4 [kernel.kallsyms] [k] ip_finish_output
>> 1.33% perf_reseau4 [unknown] [k] 0x7ffffd94
>> 1.33% perf_reseau4 [unknown] [k] 0x7ffffd95
>> 1.28% perf_reseau4 [unknown] [k] 0x7ffffd97
>> 1.26% perf_reseau4 [unknown] [k] 0x7ffffda3
>> 1.24% perf_reseau4 [unknown] [k] 0x7ffffd98
>> 1.22% perf_reseau4 [unknown] [k] 0x7ffffd92
>> 1.22% perf_reseau4 [unknown] [k] 0x7ffffd9b
>> [.....]
>>
>> This is due to function perf_instruction_pointer() reading SPR SIAR
>> which doesn't exist on e300 core. The perf_instruction_pointer() is
>> redefined in arch/powerpc/perf/core-book3s.c when CONFIG_PPC_PERF_CTRS
>> is selected.
>>
>> This patch moves the selection of CONFIG_PPC_HAVE_PMU in 86xx section
>> so that CONFIG_PPC_PERF_CTRS won't be selected for other 6xx powerpc
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> So, what happens when a kernel is built that supports both 83xx and 86xx?
Right, so should we define a processor feature for it ?
> Plus, it's e300, not e600, that is the exception among 6xx-style cores.
Is it ? I've been looking for special register SIAR (spr 955) in several
6xx reference manuals.
82xx doesn't have it, 52xx and 512x don't have it.
I found it only in the 86xx
Which other family has it ?
Christophe
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
2015-09-04 18:00 ` christophe leroy
@ 2015-09-04 18:31 ` Segher Boessenkool
2015-09-04 19:51 ` Segher Boessenkool
2015-09-09 22:24 ` Scott Wood
2 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2015-09-04 18:31 UTC (permalink / raw)
To: christophe leroy; +Cc: Scott Wood, linux-kernel, Paul Mackerras, linuxppc-dev
On Fri, Sep 04, 2015 at 08:00:59PM +0200, christophe leroy wrote:
> >Plus, it's e300, not e600, that is the exception among 6xx-style cores.
> Is it ? I've been looking for special register SIAR (spr 955) in several
> 6xx reference manuals.
> 82xx doesn't have it, 52xx and 512x don't have it.
> I found it only in the 86xx
> Which other family has it ?
7xx, 7xxx have it. I don't think any 603 or 604 have it.
Segher
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
2015-09-04 18:00 ` christophe leroy
2015-09-04 18:31 ` Segher Boessenkool
@ 2015-09-04 19:51 ` Segher Boessenkool
2015-09-09 22:24 ` Scott Wood
2 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2015-09-04 19:51 UTC (permalink / raw)
To: christophe leroy; +Cc: Scott Wood, linux-kernel, Paul Mackerras, linuxppc-dev
[ it seems my previous mail disappeared down the void ]
On Fri, Sep 04, 2015 at 08:00:59PM +0200, christophe leroy wrote:
> >Plus, it's e300, not e600, that is the exception among 6xx-style cores.
> Is it ? I've been looking for special register SIAR (spr 955) in several
> 6xx reference manuals.
> 82xx doesn't have it, 52xx and 512x don't have it.
> I found it only in the 86xx
> Which other family has it ?
All 7xx and 7xxx have it. No 603 or 604 does afaik.
Segher
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
2015-09-04 18:00 ` christophe leroy
2015-09-04 18:31 ` Segher Boessenkool
2015-09-04 19:51 ` Segher Boessenkool
@ 2015-09-09 22:24 ` Scott Wood
2015-09-10 0:47 ` Michael Ellerman
2 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2015-09-09 22:24 UTC (permalink / raw)
To: christophe leroy
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
linux-kernel, linuxppc-dev, Joakim Tjernlund
On Fri, 2015-09-04 at 20:00 +0200, christophe leroy wrote:
> Le 04/09/2015 18:43, Scott Wood a écrit :
> > On Thu, Sep 03, 2015 at 11:27:03AM +0200, Christophe Leroy wrote:
> > > On PPC832x, perf record/report reports martian addresses
> > >
> > > 2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send
> > > 2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb
> > > 1.62% perf_reseau4 [kernel.kallsyms] [k]
> > > __ip_append_data.isra.39
> > > 1.55% perf_reseau4 [kernel.kallsyms] [k] ip_finish_output
> > > 1.33% perf_reseau4 [unknown] [k] 0x7ffffd94
> > > 1.33% perf_reseau4 [unknown] [k] 0x7ffffd95
> > > 1.28% perf_reseau4 [unknown] [k] 0x7ffffd97
> > > 1.26% perf_reseau4 [unknown] [k] 0x7ffffda3
> > > 1.24% perf_reseau4 [unknown] [k] 0x7ffffd98
> > > 1.22% perf_reseau4 [unknown] [k] 0x7ffffd92
> > > 1.22% perf_reseau4 [unknown] [k] 0x7ffffd9b
> > > [.....]
> > >
> > > This is due to function perf_instruction_pointer() reading SPR SIAR
> > > which doesn't exist on e300 core. The perf_instruction_pointer() is
> > > redefined in arch/powerpc/perf/core-book3s.c when CONFIG_PPC_PERF_CTRS
> > > is selected.
> > >
> > > This patch moves the selection of CONFIG_PPC_HAVE_PMU in 86xx section
> > > so that CONFIG_PPC_PERF_CTRS won't be selected for other 6xx powerpc
> > >
> > > Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> > So, what happens when a kernel is built that supports both 83xx and 86xx?
> Right, so should we define a processor feature for it ?
There aren't many CPU feature flags left (without changing the mechanism to
make more available), and runtime patching shouldn't be necessary. Instead,
use the existing oprofile_type field. BTW, I don't know why we have pmc_type
in addition to that -- the hardware only needs to be described once,
regardless of how many subsystems care about it.
Note that this will only address the case of failing gracefully when the
running hardware doesn't support the compiled-in perf mechanism. Actually
supporting both mechanisms in the same kernel (some e300 cores support fsl-
emb) would require a new indirection layer.
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600
2015-09-09 22:24 ` Scott Wood
@ 2015-09-10 0:47 ` Michael Ellerman
0 siblings, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2015-09-10 0:47 UTC (permalink / raw)
To: Scott Wood
Cc: christophe leroy, Benjamin Herrenschmidt, Paul Mackerras,
linux-kernel, linuxppc-dev, Joakim Tjernlund
On Wed, 2015-09-09 at 17:24 -0500, Scott Wood wrote:
> On Fri, 2015-09-04 at 20:00 +0200, christophe leroy wrote:
> > Le 04/09/2015 18:43, Scott Wood a écrit :
> > > On Thu, Sep 03, 2015 at 11:27:03AM +0200, Christophe Leroy wrote:
> > > > On PPC832x, perf record/report reports martian addresses
> > > >
> > > > 2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send
> > > > 2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb
> > > > 1.62% perf_reseau4 [kernel.kallsyms] [k]
> > > > __ip_append_data.isra.39
> > > > 1.55% perf_reseau4 [kernel.kallsyms] [k] ip_finish_output
> > > > 1.33% perf_reseau4 [unknown] [k] 0x7ffffd94
> > > > 1.33% perf_reseau4 [unknown] [k] 0x7ffffd95
> > > > 1.28% perf_reseau4 [unknown] [k] 0x7ffffd97
> > > > 1.26% perf_reseau4 [unknown] [k] 0x7ffffda3
> > > > 1.24% perf_reseau4 [unknown] [k] 0x7ffffd98
> > > > 1.22% perf_reseau4 [unknown] [k] 0x7ffffd92
> > > > 1.22% perf_reseau4 [unknown] [k] 0x7ffffd9b
> > > > [.....]
> > > >
> > > > This is due to function perf_instruction_pointer() reading SPR SIAR
> > > > which doesn't exist on e300 core. The perf_instruction_pointer() is
> > > > redefined in arch/powerpc/perf/core-book3s.c when CONFIG_PPC_PERF_CTRS
> > > > is selected.
> > > >
> > > > This patch moves the selection of CONFIG_PPC_HAVE_PMU in 86xx section
> > > > so that CONFIG_PPC_PERF_CTRS won't be selected for other 6xx powerpc
> > > >
> > > > Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> > > So, what happens when a kernel is built that supports both 83xx and 86xx?
> > Right, so should we define a processor feature for it ?
>
> There aren't many CPU feature flags left (without changing the mechanism to
> make more available), and runtime patching shouldn't be necessary. Instead,
> use the existing oprofile_type field.
Yep, +1. Only add new cpu feature flags if you really need them please.
> BTW, I don't know why we have pmc_type in addition to that -- the hardware
> only needs to be described once, regardless of how many subsystems care about
> it.
Right, I think that's all just accreted over the years, and predates perf. We
could probably consolidate some of it.
cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-10 0:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-03 9:27 [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600 Christophe Leroy
2015-09-03 9:47 ` Michael Ellerman
2015-09-04 16:43 ` Scott Wood
2015-09-04 18:00 ` christophe leroy
2015-09-04 18:31 ` Segher Boessenkool
2015-09-04 19:51 ` Segher Boessenkool
2015-09-09 22:24 ` Scott Wood
2015-09-10 0:47 ` Michael Ellerman
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).