On Wed, Oct 16, 2013 at 2:42 PM, Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote: > On Wed, 2013-10-16 at 11:05 -0400, Martin Hicks wrote: >> Actually, I was wrong, the mpc8379 is an e300c4. >> >> So it seems clear to me that we compile in the book3s code because >> this is an 83xx CPU part. I also see that Kconfig knows that I have >> an core-fsl-emb but we don't actually compile the PMU backend for it >> because there's no support for anything but e500. >> >> mort@chinook:~/src/s4v2-glibc/linux-mpc$ grep PERF .config >> CONFIG_FSL_EMB_PERFMON=y >> CONFIG_PPC_PERF_CTRS=y >> CONFIG_HAVE_PERF_EVENTS=y >> CONFIG_PERF_EVENTS=y >> # CONFIG_DEBUG_PERF_USE_VMALLOC is not set >> mort@chinook:~/src/s4v2-glibc/linux-mpc$ grep BOOK3S .config >> CONFIG_PPC_BOOK3S_32=y >> CONFIG_PPC_BOOK3S=y >> >> more below... >> >> On Tue, Oct 15, 2013 at 4:39 PM, Benjamin Herrenschmidt >> <b...@kernel.crashing.org> wrote: >> > On Tue, 2013-10-15 at 15:22 -0500, Scott Wood wrote: >> >> On Tue, 2013-10-15 at 14:53 -0500, Benjamin Herrenschmidt wrote: >> >> > On Tue, 2013-10-15 at 14:44 -0400, Martin Hicks wrote: >> >> > > > >> >> > > > This is an e300 core right ? (603...). Do that have an SIAR at all >> >> > > > (Scott ?) >> >> > > >> >> > > Yes, e300c3. >> >> > >> >> > Ok so I have a hard time figuring out how that patch can make a >> >> > difference since for all I can see, there is no perf backend upstream >> >> > for e300 at all :-( >> >> > >> >> > I must certainly be missing something ... Scott, can you have a look ? >> >> >> >> e300c3 has a core-fsl-emb style performance monitor (though Linux >> >> doesn't support it yet). If a bug was bisected to a change in >> >> core-book3s.c, then it's probably a coincidence due to moving code >> >> around. >> >> CONFIG_PPC_PERF_CTRS seems to give the mpc8379 some kind of basic >> performance measuring. Is this through dummy_perf() in >> arch/powerpc/kernel/pmc.c? >> >> > >> > Mort, can you see if just that change is enough to cause the problem ? >> >> It is not. The patch that does get IPs working again in my 3.11 tree >> is this one: >> >> diff --git a/arch/powerpc/perf/core-book3s.c >> b/arch/powerpc/perf/core-book3s.c >> index eeae308..9a3f572 100644 >> --- a/arch/powerpc/perf/core-book3s.c >> +++ b/arch/powerpc/perf/core-book3s.c >> @@ -122,10 +122,6 @@ void power_pmu_flush_branch_stack(void) {} >> static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {} >> #endif /* CONFIG_PPC32 */ >> >> -static bool regs_use_siar(struct pt_regs *regs) >> -{ >> - return !!regs->result; >> -} > > Can you try instead just chaning regs_use_siar to return false always ? > Do that help ? >
That does fix the problem. v3.11 with the following: diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index eeae308..e91cf67 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c @@ -124,7 +124,7 @@ static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {} static bool regs_use_siar(struct pt_regs *regs) { - return !!regs->result; + return 0; //!!regs->result; } /* mh -- Martin Hicks P.Eng. | m...@bork.org Bork Consulting Inc. | +1 (613) 266-2296 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev