xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xenproject.org
Cc: Andre Przywara <andre.przywara@arm.com>,
	stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 2/2] xen/arm: gic-v3: Allow Xen to run on hardware reporting GICv4
Date: Tue, 15 Sep 2015 12:02:52 +0100	[thread overview]
Message-ID: <55F7FADC.8090605@citrix.com> (raw)
In-Reply-To: <1442310586.3549.358.camel@citrix.com>

On 15/09/15 10:49, Ian Campbell wrote:
> On Mon, 2015-09-14 at 16:32 +0100, Julien Grall wrote:
>> It seems that there is some hardware which report start to report GICv4
> 
> s/report start to reports/reports/ ?

Yes, reports.

> Also, this is an odd way to express it, what you mean is that some hardware
> is now shipping with GICv4. Unless you are trying to imply that they are
> claiming to be GICv4 without actually being so?

GICv4 is an extension of GICv3 and should support any GICv3 feature.

It's not like GICv2 vs GICv3 where the GICv2 part is an optional feature
in the GICv3.

> (If we agree on some wording I can modify this text on commit, subject to
> the discussion below).


What about:

"The GICv4 is an extension of GICv3 (see 1.1 in ARM IHI 0069A) which
means that the GICv3 driver can run normally on a GICv4 hardware.

Though, the GICv4-only feature won't be used."

>> in the GIC*_PIDR2 register.
>>
>> As GICv4 is a superset of GICv3, it should just work on Xen.
>>
>> Reported-by: Andre Przywara <andre.przywara@arm.com>
>> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>> ---
>>  xen/arch/arm/gic-v3.c             | 4 ++--
>>  xen/include/asm-arm/gic_v3_defs.h | 1 +
>>  2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
>> index 4d623bf..1e3c19b 100644
>> --- a/xen/arch/arm/gic-v3.c
>> +++ b/xen/arch/arm/gic-v3.c
>> @@ -640,7 +640,7 @@ static int __init gicv3_populate_rdist(void)
>>          void __iomem *ptr = gicv3.rdist_regions[i].map_base;
>>  
>>          reg = readl_relaxed(ptr + GICR_PIDR2) & GIC_PIDR2_ARCH_MASK;
>> -        if ( reg != GIC_PIDR2_ARCH_GICv3 )
>> +        if ( reg != GIC_PIDR2_ARCH_GICv3 && reg != GIC_PIDR2_ARCH_GICv4 )
> 
> Once we have GICv5, 6, etc this is going to get unwieldy, shall we switch
> to a switch now?

We don't have a spec for GICv5 and v6 right now. I would wait to see if
the driver can be re-used before doing a such change.

>>          {
>>              dprintk(XENLOG_ERR,
>>                      "GICv3: No redistributor present @%"PRIpaddr"\n",
> 
> I wonder if GICv3 ought to become GICv%d, on the other hand this is really
> the GICv3 driver driving a v4 in v3 "mode", so maybe v3 is the best
> logging.

We are logging the driver name and not the version. I'd like to keep
like that because it's simple and easy to grep.

Regards,

-- 
Julien Grall

  parent reply	other threads:[~2015-09-15 11:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 15:32 [PATCH 0/2] GICv3: Clean up + enable support on GICv4 Julien Grall
2015-09-14 15:32 ` [PATCH 1/2] xen/arm: gic-v3: Clean-up the GIC*_PIDR2_* definitions Julien Grall
2015-09-15  9:35   ` Ian Campbell
2015-09-14 15:32 ` [PATCH 2/2] xen/arm: gic-v3: Allow Xen to run on hardware reporting GICv4 Julien Grall
2015-09-15  9:49   ` Ian Campbell
2015-09-15 10:28     ` Andre Przywara
2015-09-15 11:02     ` Julien Grall [this message]
2015-09-15 11:15       ` Ian Campbell
2015-09-15 11:19         ` Julien Grall
2015-09-24 11:32           ` Ian Campbell
2015-09-21 15:54 ` [PATCH 0/2] GICv3: Clean up + enable support on GICv4 Julien Grall

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=55F7FADC.8090605@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=andre.przywara@arm.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.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).