From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3] arm: l2x0: add PMU support
Date: Tue, 30 Aug 2016 13:47:09 +0100 [thread overview]
Message-ID: <20160830124709.GF1223@leverpostej> (raw)
In-Reply-To: <20160830111222.GN1041@n2100.armlinux.org.uk>
On Tue, Aug 30, 2016 at 12:12:22PM +0100, Russell King - ARM Linux wrote:
> On Tue, Aug 30, 2016 at 11:16:18AM +0100, Mark Rutland wrote:
> > The L2C-220 (AKA L220) and L2C-310 (AKA PL310) cache controllers feature
> > a Performance Monitoring Unit (PMU), which can be useful for tuning
> > and/or debugging. This hardware is always present and the relevant
> > registers are accessible to non-secure accesses. Thus, no special
> > firmware interface is necessary.
> >
> > This patch adds support for the PMU, plugging into the usual perf
> > infrastructure. The overflow interrupt is not always available (e.g. on
> > RealView PBX A9 it is not wired up at all), and the hardware counters
> > saturate, so the driver does not make use of this. Instead, the driver
> > periodically polls and reset counters as required to avoid losing
> > events due to saturation.
> ...
> > + /*
> > + * Choose the name to identify the PMU under sysfs. This is also used
> > + * by l2x0_pmu_event_attr_is_visible to determine which events to
> > + * display, as the PL310 PMU supports a superset of L220 events.
> > + *
> > + * The L210 PMU has a different programmer's interface, and is not
> > + * supported by this driver.
>
> This rather worries me a bit - if the L2C-210 needs a different driver,
> should we be putting this driver in this file, or should we be keeping
> it as a separate file? What if L2C-210 grows a PMU driver which is
> also tacked on the end of the file - it seems to me that this is rather
> unwieldy.
>
> My feeling is that we've already enough random bits tacked into this
> file supporting all the L2C-210 related variants.
Sure. I'll see about factoring the PMU parts out into a separate file,
modulo a couple of hooks for suspend/resume and init.
Thanks,
Mark.
prev parent reply other threads:[~2016-08-30 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 10:16 [PATCHv3] arm: l2x0: add PMU support Mark Rutland
2016-08-30 11:12 ` Russell King - ARM Linux
2016-08-30 12:47 ` Mark Rutland [this message]
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=20160830124709.GF1223@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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