From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 RESEND 2/2] ARM: local timers: add timer support using IO mapped register
Date: Fri, 28 Sep 2012 16:57:46 +0100 [thread overview]
Message-ID: <20120928155746.GB2253@linaro.org> (raw)
In-Reply-To: <20120928122858.GD9472@e106331-lin.cambridge.arm.com>
[ Note: please aim to CC devicetree-discuss at lists.ozlabs.org with any
patches or bindings relevant to device tree. ]
[ Lorenzo, there's a question for you further down this mail. ]
On Fri, Sep 28, 2012 at 01:28:58PM +0100, Mark Rutland wrote:
> On Tue, Sep 25, 2012 at 08:08:47PM +0100, Rohit Vaswani wrote:
> > Any comments ?
>
> I have a few questions about the irq side of things.
>
> > > diff --git a/Documentation/devicetree/bindings/arm/arch_timer.txt b/Documentation/devicetree/bindings/arm/arch_timer.txt
> > > index 52478c8..8e01328 100644
> > > --- a/Documentation/devicetree/bindings/arm/arch_timer.txt
> > > +++ b/Documentation/devicetree/bindings/arm/arch_timer.txt
> > > @@ -7,10 +7,13 @@ The timer is attached to a GIC to deliver its per-processor interrupts.
> > >
> > > ** Timer node properties:
> > >
> > > -- compatible : Should at least contain "arm,armv7-timer".
> > > +- compatible : Should at least contain "arm,armv7-timer" or
> > > + "arm,armv7-timer-mem" if using the memory mapped arch timer interface.
> > >
> > > -- interrupts : Interrupt list for secure, non-secure, virtual and
> > > - hypervisor timers, in that order.
> > > +- interrupts : If using the cp15 interface, the interrupt list for secure,
> > > + non-secure, virtual and hypervisor timers, in that order.
We should use the correct architectural terms for documenting these.
For example, "non-secure" requires qualification.
If I understand the ARM ARM correctly, the architectural names are
* Secure PL1 physical
* Non-secure PL2 physical
* Non-secure PL1 physical
* Virtual
[...]
> What privilege level are the interrupts for the memory-mapped interface?
>
> Could each core have multiple interrupts at different privilege levels?
>
> I also notice we don't seem to handle the case of systems without security
> extensions, which only have physical and virtual interrupts. If we're adding
> support for different interrupt setups, how do we handle them?
Agreed, some of the timers will be absent depending on the architectural
options implemented by the processor.
Also, timers not visible to / usable by the kernel being booted should
probably left out of the DT, even though the hardware may physically have
them:
For example, a guest should not see the Secure PL1 physical timer or the
Non-secure PL2 physical timer. A hypervisor or host OS which does not
provide the guest with access to the Non-secure PL1 physical timer (such
as KVM) should leave that out too: there is no exception-free way for
the OS to probe that directly: i.e., from the guest's point of view the
device doesn't exist at all, so it seems wrong for the DT to include them
in this case.
[...]
> > > + If using the memory mapped interface, list the interrupts for each core,
> > > + starting with core 0.
>
> I take it that core 0 means physical cpu 0 (i.e. MPIDR.Aff{2,1,0} == 0)?
Lorenzo, should we have a standard way of referring to CPUs and topology
nodes documented as part of the topology bindings? We certainly need
rules of some kind, since when the topology is non-trivial there is no
well-defined "first" CPU, nor any single correct order in which to list
CPUs.
The topology may also be sparsely populated (e.g.,
Aff[2,1,0] in { (0,0,0), (0,0,1), (0,1,0), (0,1,1), (0,1,2), (0,1,3) })
It would be bad if different driver bindings end up solving this in
different ways (even non-broken ways)
Cheers
---Dave
[...]
next prev parent reply other threads:[~2012-09-28 15:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-15 7:41 [PATCH v2 RESEND 1/2] ARM: arch timer: Set the TVAL before timer is enabled Rohit Vaswani
2012-09-15 7:41 ` [PATCH v2 RESEND 2/2] ARM: local timers: add timer support using IO mapped register Rohit Vaswani
2012-09-25 19:08 ` Rohit Vaswani
2012-09-27 15:46 ` Marc Zyngier
2012-09-28 12:28 ` Mark Rutland
2012-09-28 15:57 ` Dave Martin [this message]
2012-09-28 17:15 ` Lorenzo Pieralisi
2012-10-02 11:27 ` Dave Martin
2012-10-02 13:44 ` Lorenzo Pieralisi
2012-10-02 15:03 ` Dave Martin
2012-09-15 17:00 ` [PATCH v2 RESEND 1/2] ARM: arch timer: Set the TVAL before timer is enabled David Brown
2012-09-15 19:53 ` Rohit Vaswani
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=20120928155746.GB2253@linaro.org \
--to=dave.martin@linaro.org \
--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;
as well as URLs for NNTP newsgroup(s).