From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] ARM: perf: Support i.MX53
Date: Wed, 30 Jul 2014 11:46:04 +0100 [thread overview]
Message-ID: <20140730104604.GG12239@arm.com> (raw)
In-Reply-To: <53D7CE8E.70103@parkeon.com>
On Tue, Jul 29, 2014 at 05:40:46PM +0100, Martin Fuzzey wrote:
> On 29/07/14 14:52, Will Deacon wrote:
> > Instead, how about we add a new property on the PMU node that says it
> > requires secure access, then we use that to configuer SDER in the perf code.
>
> Ok but how would the new property be used?
> Do you just mean making the code that sets the SUNIDEN bit conditional
> on this property?
We'd add a property to the PMU, so it would look something like:
pmu {
compatible = "arm,cortex-a8-pmu";
interrupts = < ... >;
secure-reg-access;
};
Then we can match that last property in the driver and only configure the
SDER if it's present.
> So a DT for a board booting in secure mode would have the property set
> and one booting in non secure mode would not?
Yes. It's also slightly more general in that you can set the property for
any PMU that requires SDER configuration. In practice, that probable means
`booted in secure mode' but you never know what people build.
> But is it the DT's business to know how the kernel has been booted?
I don't have an alternative other than only supporting perf in non-secure
mode.
> What happens in non secure mode?
Exactly the same as what happens now; the property would be absent so
existing behaviour would be preserved.
> I presume the kernel won't touch SDER in that case (so avoiding an
> exception) but the counters will only work if code outside the kernel
> (bootloader, secure monitor?) has already set things up correctly?
Right. Secure software could restrict non-secure debug visibility, but
that's not something Linux can do anything about.
> Wouldn't it be possible to detect if the kernel is in secure mode and
> use that instead of a DT property?
> Does the kernel have that information?
No, you can't reliably detect that in the architecture.
> > Then you can do your SoC-specific magic as part of the runtime PM hooks we
> > already have (it looks like enabled/disabling a clock really).
> This is orthogonal to the above right?
>
> Indeed, I've tried that and it works without any extra hooks.
>
> But what happens if we don't have CONFIG_PM_RUNTIME ?
Then you don't get perf unless you configure things correctly in your
firmware. This is just like configuring clocks.
Will
prev parent reply other threads:[~2014-07-30 10:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 12:32 [PATCH 0/4] ARM: perf: Support i.MX53 Martin Fuzzey
2014-07-29 12:32 ` [PATCH 1/4] ARM: perf: Set suniden bit Martin Fuzzey
2014-07-29 12:33 ` [PATCH 2/4] ARM: perf: Add platform specific start/stop callbacks Martin Fuzzey
2014-07-29 12:33 ` [PATCH 3/4] ARM: i.MX53: Add Soc specific PMU setup Martin Fuzzey
2014-07-29 12:33 ` [PATCH 4/4] ARM: dts: i.MX53: Add PMU DT entry Martin Fuzzey
2014-07-29 12:52 ` [PATCH 0/4] ARM: perf: Support i.MX53 Will Deacon
2014-07-29 16:40 ` Martin Fuzzey
2014-07-30 10:46 ` Will Deacon [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=20140730104604.GG12239@arm.com \
--to=will.deacon@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.