From: Kumar Gala <galak@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>,
benh@kernel.crashing.org, Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 5/6] perf_counter: powerpc: Add processor back-end for MPC7450 family
Date: Wed, 17 Jun 2009 09:14:58 -0500 [thread overview]
Message-ID: <34BD6A89-A05E-40CC-A495-017BFB08B796@kernel.crashing.org> (raw)
In-Reply-To: <19000.55631.802122.696927@cargo.ozlabs.ibm.com>
On Jun 17, 2009, at 6:53 AM, Paul Mackerras wrote:
> This adds support for the performance monitor hardware on the
> MPC7450 family of processors (7450, 7451, 7455, 7447/7457, 7447A,
> 7448), used in the later Apple G4 powermacs/powerbooks and other
> machines. These machines have 6 hardware counters with a unique
> set of events which can be counted on each counter, with some
> events being available on multiple counters.
>
> Raw event codes for these processors are (PMC << 8) + PMCSEL.
> If PMC is non-zero then the event is that selected by the given
> PMCSEL value for that PMC (hardware counter). If PMC is zero
> then the event selected is one of the low-numbered ones that are
> common to several PMCs. In this case PMCSEL must be <= 22 and
> the event is what that PMCSEL value would select on PMC1 (but
> it may be placed any other PMC that has the same event for that
> PMCSEL value).
>
> For events that count cycles or occurrences that exceed a threshold,
> the threshold requested can be specified in the 0x3f000 bits of the
> raw event codes. If the event uses the threshold multiplier bit
> and that bit should be set, that is indicated with the 0x40000 bit
> of the raw event code.
>
> This fills in some of the generic cache events. Unfortunately there
> are quite a few blank spaces in the table, partly because these
> processors tend to count cache hits rather than cache accesses.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> arch/powerpc/kernel/Makefile | 2 +
> arch/powerpc/kernel/mpc7450-pmu.c | 417 +++++++++++++++++++++++
> +++++++++
> arch/powerpc/platforms/Kconfig.cputype | 1 +
> 3 files changed, 420 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/kernel/mpc7450-pmu.c
>
> diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/
> Makefile
> index c5f93f0..a9f8829 100644
> --- a/arch/powerpc/kernel/Makefile
> +++ b/arch/powerpc/kernel/Makefile
> @@ -98,6 +98,7 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
> obj-$(CONFIG_PPC_PERF_CTRS) += perf_counter.o
> obj64-$(CONFIG_PPC_PERF_CTRS) += power4-pmu.o ppc970-pmu.o power5-
> pmu.o \
> power5+-pmu.o power6-pmu.o power7-pmu.o
This should be something like:
obj64-$(CONFIG_PPC_PERF_CTRS)-$(PPC_BOOK3S_64)
> +obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o
obj32-$(CONFIG_PPC_PERF_CTRS)-$(PPC_BOOK3S_32)
Or use new Kconfig types as I suggested on patch 1/6
> obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o
>
> @@ -106,6 +107,7 @@ obj-y += iomap.o
> endif
>
> obj-$(CONFIG_PPC64) += $(obj64-y)
> +obj-$(CONFIG_PPC32) += $(obj32-y)
>
> ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),)
> obj-y += ppc_save_regs.o
> diff --git a/arch/powerpc/kernel/mpc7450-pmu.c b/arch/pow
next prev parent reply other threads:[~2009-06-17 14:15 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 11:50 [PATCH 1/6] perf_counter: powerpc: Enable use of software counters on 32-bit powerpc Paul Mackerras
2009-06-17 11:51 ` [PATCH 2/6] perf_counter: powerpc: Use unsigned long for register and constraint values Paul Mackerras
2009-06-17 14:18 ` [tip:perfcounters/powerpc] " tip-bot for Paul Mackerras
2009-06-18 12:49 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
2009-06-17 11:52 ` [PATCH 3/6] perf_counter: powerpc: Change how processor-specific back-ends get selected Paul Mackerras
2009-06-17 14:19 ` [tip:perfcounters/powerpc] " tip-bot for Paul Mackerras
2009-06-18 12:49 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
2009-06-17 11:53 ` [PATCH 4/6] perf_counter: powerpc: Make powerpc perf_counter code safe for 32-bit kernels Paul Mackerras
2009-06-17 14:19 ` [tip:perfcounters/powerpc] " tip-bot for Paul Mackerras
2009-06-18 12:49 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
2009-06-17 11:53 ` [PATCH 5/6] perf_counter: powerpc: Add processor back-end for MPC7450 family Paul Mackerras
2009-06-17 14:14 ` Kumar Gala [this message]
2009-06-17 23:24 ` Paul Mackerras
2009-06-18 12:50 ` Kumar Gala
2009-06-18 21:10 ` Paul Mackerras
2009-06-17 14:19 ` [tip:perfcounters/powerpc] " tip-bot for Paul Mackerras
2009-06-18 12:49 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
2009-06-17 11:54 ` [PATCH 6/6] perf_counter: tools: Makefile tweaks for 64-bit powerpc Paul Mackerras
2009-06-17 12:08 ` Ingo Molnar
2009-06-17 12:27 ` Paul Mackerras
2009-06-17 13:28 ` Ingo Molnar
2009-06-18 9:13 ` Ingo Molnar
2009-06-19 8:16 ` Paul Mackerras
2009-06-19 16:27 ` Ingo Molnar
2009-06-18 12:50 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
2009-06-17 12:04 ` [PATCH 1/6] perf_counter: powerpc: Enable use of software counters on 32-bit powerpc Ingo Molnar
2009-06-17 14:10 ` Kumar Gala
2009-06-17 23:22 ` Paul Mackerras
2009-06-17 14:21 ` Ingo Molnar
2009-06-17 14:24 ` Kumar Gala
2009-06-17 14:27 ` Ingo Molnar
2009-06-18 23:03 ` Benjamin Herrenschmidt
2009-06-20 10:32 ` Ingo Molnar
2009-06-17 23:27 ` Paul Mackerras
2009-06-18 9:04 ` Ingo Molnar
2009-06-18 23:01 ` Benjamin Herrenschmidt
2009-06-18 12:48 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34BD6A89-A05E-40CC-A495-017BFB08B796@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=a.p.zijlstra@chello.nl \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®