Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Dirk Behme <dirk.behme@de.bosch.com>
Cc: geert+renesas@glider.be, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: r8a7795: Increase the size of GIC-400 mapped registers
Date: Thu, 19 May 2016 11:16:52 +0900	[thread overview]
Message-ID: <20160519021652.GC22969@verge.net.au> (raw)
In-Reply-To: <c22b4495-bae3-d4b9-08d1-2ce2c25a5bf8@de.bosch.com>

On Wed, May 18, 2016 at 10:00:52AM +0200, Dirk Behme wrote:
> Hi Geert and Simon,
> 
> On 16.05.2016 10:12, Simon Horman wrote:
> >Hi Dirk,
> >
> >On Tue, May 03, 2016 at 07:48:32PM +0200, Dirk Behme wrote:
> >>Hi Simon,
> >>
> >>On 29.04.2016 12:35, Marc Zyngier wrote:
> >>>On Fri, 29 Apr 2016 09:43:45 +1000
> >>>Simon Horman <horms@verge.net.au> wrote:
> >>>
> >>>>[Cc Mark Zyngier, linux-arm-kernel]
> >>>>
> >>>>Hi Dirk,
> >>>>
> >>>>On Thu, Apr 28, 2016 at 07:41:57AM +0200, Dirk Behme wrote:
> >>>>>Hi Simon,
> >>>>>
> >>>>>On 28.04.2016 01:30, Simon Horman wrote:
> >>>>>>Hi Dirk,
> >>>>>>
> >>>>>>I understand that there is an issue here but I'm not yet able
> >>>>>>to convince myself that this is the correct solution.
> >>>>>>
> >>>>>>In revision r0p1 of the CoreLink GIC-400 Generic Interrupt Controller
> >>>>>>Technical Reference Manual[1] I see in Section 3.2. "GIC-400 register map"
> >>>>>>that the size of both the CPU interfaces and Virtual CPU interfaces are
> >>>>>>0x2000 bytes. And assuming that the hardware follows the specification it
> >>>>>>appears that DT is correctly describing the hardware.
> >>>>>
> >>>>>
> >>>>>I think you are missing the details described by ARM in
> >>>>>
> >>>>>http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=21550029f709072aacf3b9
> >>>>>
> >>>>>
> >>>>>Maybe Julien could help if you have some more doubts?
> >>>>
> >>>>I guess I am confused.
> >>>>
> >>>>I see that there is now handling of the case where the region size is
> >>>>128Kbytes. But I'm still not seeing the bit which describes that the
> >>>>GIC-400  has a region size of 128Kbytes. Perhaps the later is somehow
> >>>>implied by the former. Or perhaps I need to check with the hw team.
> >>>
> >>>Please have a look at the SBSA document, and in particular the
> >>>Appendix-F (registration and selling your soul required - only kidding):
> >>>
> >>>http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html
> >>>
> >>>This requires that, in order for the two halves of GICV to be trappable
> >>>*separately* by a hypervisor using 64kB pages at Stage-2, the two 4kB
> >>>pages that describe that region are aliased as such:
> >>>- the first 4kB page is aliased 16 times over a 64kB region
> >>>- the second 4kB page is aliased 16 times over another contiguous 64kB
> >>>  region
> >>>
> >>>This means that your GIC is indeed covering a 128kB region, with the
> >>>mapping corresponding to the GICv2 memory map located at offset 0xf000
> >>>from the base of that 128kB region. Also, this GICV requirement also
> >>>applies to GICC (most likely because the two regions use the same
> >>>decoding logic).
> >>>
> >>>The OS must of course be aware of this (see gic_check_eoimode in the
> >>>GIC driver). Of course, almost nobody got that right (I only know of
> >>>the APM Xgene-1 so far). If you actually did, great!
> >>>
> >>>Also, the ACPI spec fails to recognize this by not providing the length
> >>>of the region, meaning that those who got it right with DT are likely
> >>>to get it wrong with ACPI, and vice-versa.
> >>>
> >>>It's a wonderful world.
> >>
> >>
> >>Could this patch be applied, then?
> >
> >Yes I have now done so :)
> 
> 
> In parallel, a r8a7796.dtsi was added where this change is missing, now:
> 
> https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git/tree/arch/arm64/boot/dts/renesas/r8a7796.dtsi?h=topic/gen3-latest
> 
> Do you need a new patch to add this to the r8a7796.dtsi, too? Or could you
> apply
> 
> https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git/commit/arch/arm64/boot/dts/renesas?h=topic/gen3-latest&id=f7c7e97097915643a86051fe557b41a87c837172
> 
> to the r8a7796.dtsi, too?

Hi Dirk,

The copy of r8a7796.dtsi in that tree is from a topic branch and
it is not targeted at upstream in that form.

I am working on patches to add r8a7796.dtsi amongst other things
and will include this change there.

  parent reply	other threads:[~2016-05-19  2:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  6:29 [PATCH] arm64: dts: r8a7795: Increase the size of GIC-400 mapped registers Dirk Behme
2016-04-27 23:30 ` Simon Horman
2016-04-28  5:41   ` Dirk Behme
2016-04-28 23:43     ` Simon Horman
2016-04-29 10:35       ` Marc Zyngier
2016-05-03 17:48         ` Dirk Behme
2016-05-16  8:12           ` Simon Horman
2016-05-18  8:00             ` Dirk Behme
2016-05-18  8:04               ` Geert Uytterhoeven
2016-05-19  2:16               ` Simon Horman [this message]
2016-05-19  5:02                 ` Dirk Behme
2016-05-10 13:33 ` Geert Uytterhoeven
2016-05-10 14:17   ` Marc Zyngier
2016-05-10 15:29     ` Dirk Behme
2016-05-10 16:03       ` Marc Zyngier

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=20160519021652.GC22969@verge.net.au \
    --to=horms@verge.net.au \
    --cc=dirk.behme@de.bosch.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-renesas-soc@vger.kernel.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