From: Ian Campbell <ian.campbell@citrix.com>
To: devicetree@vger.kernel.org
Cc: Feng Kan <fkan@apm.com>, Kumar Sankaran <ksankaran@apm.com>,
Ian Campbell <ian.campbell@citrix.com>,
linux-arm-kernel@lists.infradead.org, Loc Ho <lho@apm.com>
Subject: [PATCH 2/2] arm: Support for platforms with split GIC cpu interface registers.
Date: Fri, 1 Nov 2013 10:13:29 +0000 [thread overview]
Message-ID: <1383300809-7527-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1383300776.4332.3.camel@hastur.hellion.org.uk>
At least one platform (APM Storm) places the two pages of the GIC cpu interface
(and the vcpu side) at non-contiguous locations. Document two additional
regions to cover this split and update the corresponding dtsi. Note that Linux
(including KVM) does not use any registers in the second page so there is no
associated code change here. Xen will use these new regions, although I've not
written the corresponding code yet.
The ordering of these new regs is slightly counter intuitive but is inteded to
be backward compatible. It is also assumed that all such systems will implement
the GIC virtualisation extensions.
Add comments to all of the reg examples to help clarify what is going on.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: Kumar Sankaran <ksankaran@apm.com>
Cc: Loc Ho <lho@apm.com>
Cc: Feng Kan <fkan@apm.com>
---
Documentation/devicetree/bindings/arm/gic.txt | 57 +++++++++++++++++++++------
arch/arm64/boot/dts/apm-storm.dtsi | 6 ++-
2 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt
index ea215e8..00836d9 100644
--- a/Documentation/devicetree/bindings/arm/gic.txt
+++ b/Documentation/devicetree/bindings/arm/gic.txt
@@ -38,7 +38,8 @@ Main node required properties:
- reg : Specifies base physical address(s) and size of the GIC registers. The
first region is the GIC distributor register base and size. The 2nd region is
- the GIC cpu interface register base and size.
+ the GIC cpu interface register base and size (See also "Split GIC
+ cpu interface", below).
Optional
- interrupts : Interrupt source of the parent interrupt controller on
@@ -56,8 +57,8 @@ Example:
#interrupt-cells = <3>;
#address-cells = <1>;
interrupt-controller;
- reg = <0xfff11000 0x1000>,
- <0xfff10100 0x100>;
+ reg = <0xfff11000 0x1000>, /* GIC Dist */
+ <0xfff10100 0x100>; /* GIC CPU */
};
@@ -70,9 +71,11 @@ primary interrupt controller).
Required properties:
- reg : Additional regions specifying the base physical address and
- size of the VGIC registers. The first additional region is the GIC
- virtual interface control register base and size. The 2nd additional
- region is the GIC virtual cpu interface register base and size.
+ size of the VGIC registers. The first additional region (i.e. third
+ overall) is the GIC virtual interface control register base and
+ size. The 2nd additional region (i.e. forth overall) is the GIC
+ virtual cpu interface register base and size (See also "Split GIC
+ cpu interface", below).
- interrupts : VGIC maintenance interrupt.
@@ -82,9 +85,41 @@ Example:
compatible = "arm,cortex-a15-gic";
#interrupt-cells = <3>;
interrupt-controller;
- reg = <0x2c001000 0x1000>,
- <0x2c002000 0x2000>,
- <0x2c004000 0x2000>,
- <0x2c006000 0x2000>;
- interrupts = <1 9 0xf04>;
+ reg = <0x2c001000 0x1000>, /* GIC Dist */
+ <0x2c002000 0x2000>, /* GIC CPU */
+ <0x2c004000 0x2000>, /* GIC VCPU Control */
+ <0x2c006000 0x2000>; /* GIC VCPU1 */
+ interrupts = <1 9 0xf04>; /* GIC Maintenence IRQ */
+ };
+
+* Split GIC cpu interface
+
+ The cpu interfaces (bare-metal in region 2 and virtual in region 4)
+ may be spread over two pages, with the GICC_DIR (Deactivate
+ Interrupt Register) register falling at the start of the second
+ page. If these pages are contiguous then this is described via the
+ size of the second and fourth entries as described above
+ (e.g. 0x2000 rather than 0x1000).
+
+ However if the two pages are not contiguous then two additional
+ regions are present (5th and 6th) describing the location of the the
+ second half of the GIC cpu interface and GIC virtual cpu interface
+ respectively.
+
+ It is assumed that all such systems will implement the GIC
+ virtualisation extensions.
+
+Example:
+
+ gic: interrupt-controller@78010000 {
+ compatible = "arm,cortex-a15-gic";
+ #interrupt-cells = <3>;
+ interrupt-controller;
+ reg = <0x78010000 0x1000>, /* GIC Dist */
+ <0x78020000 0x1000>, /* GIC CPU1 */
+ <0x78040000 0x2000>, /* GIC VCPU Control */
+ <0x78060000 0x1000>, /* GIC VCPU1 */
+ <0x78030000 0x1000>, /* GIC CPU2 */
+ <0x78070000 0x1000>; /* GIC VCPU2 */
+ interrupts = <1 9 0xf04>; /* GIC Maintenence IRQ */
};
diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi
index bfdc578..b5d141a 100644
--- a/arch/arm64/boot/dts/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm-storm.dtsi
@@ -82,9 +82,11 @@
#interrupt-cells = <3>;
interrupt-controller;
reg = <0x0 0x78010000 0x0 0x1000>, /* GIC Dist */
- <0x0 0x78020000 0x0 0x1000>, /* GIC CPU */
+ <0x0 0x78020000 0x0 0x1000>, /* GIC CPU1 */
<0x0 0x78040000 0x0 0x2000>, /* GIC VCPU Control */
- <0x0 0x78060000 0x0 0x2000>; /* GIC VCPU */
+ <0x0 0x78060000 0x0 0x1000>, /* GIC VCPU1 */
+ <0x0 0x78030000 0x0 0x1000>, /* GIC CPU2 */
+ <0x0 0x78070000 0x0 0x1000>; /* GIC VCPU2 */
interrupts = <1 9 0xf04>; /* GIC Maintenence IRQ */
};
--
1.8.4.rc3
next prev parent reply other threads:[~2013-11-01 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 10:12 [PATCH 0/2] DT: correctly describe GIC400 virtualisation regions Ian Campbell
2013-11-01 10:13 ` [PATCH 1/2] arm: correct GIC cpu interface range for Cortex A15/GIC 400 Ian Campbell
[not found] ` <1383300809-7527-1-git-send-email-ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2013-11-01 22:43 ` Rob Herring
2013-11-01 10:13 ` Ian Campbell [this message]
[not found] ` <1383300809-7527-2-git-send-email-ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2013-11-22 6:54 ` [PATCH 2/2] arm: Support for platforms with split GIC cpu interface registers Anup Patel
[not found] ` <CAAhSdy0+AFrS8ZVwmM6Sx=qScx6d1DkQtc4+2SB3=PpsJiJDog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-22 7:04 ` Anup Patel
[not found] ` <CAAhSdy28OS+4QvFfEJ9o2MOGb6jS9Tjus_v7tsZTH9ZA3h=nRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-22 10:36 ` Anup Patel
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=1383300809-7527-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=devicetree@vger.kernel.org \
--cc=fkan@apm.com \
--cc=ksankaran@apm.com \
--cc=lho@apm.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;
as well as URLs for NNTP newsgroup(s).