From: Vijay Kilari <vijay.kilari@gmail.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
Vijaya Kumar K <vijaya.kumar@caviumnetworks.com>,
Tim Deegan <tim@xen.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
manish.jaggi@caviumnetworks.com
Subject: Re: [PATCH v7 1/5] xen/arm: Add support for GIC v3
Date: Tue, 22 Jul 2014 17:00:49 +0530 [thread overview]
Message-ID: <CALicx6tDjbsLAg=p5Efbp41ribzRZ958L8azPcw4ZmbXMepaqg@mail.gmail.com> (raw)
In-Reply-To: <53CE474E.5040809@linaro.org>
On Tue, Jul 22, 2014 at 4:43 PM, Julien Grall <julien.grall@linaro.org> wrote:
>
>
> On 22/07/14 11:43, Ian Campbell wrote:
>>
>> On Tue, 2014-07-22 at 11:01 +0100, Julien Grall wrote:
>>>
>>>
>>> On 22/07/14 10:48, Vijay Kilari wrote:
>>>>>>
>>>>>> +/*
>>>>>> + * Additional registers defined in GIC v3.
>>>>>> + * Common GICD registers are defined in gic.h
>>>>>> + */
>>>>>> +
>>>>>> +#define GICD_STATUSR (0x010)
>>>>>> [...][
>>>>>> +#define GICV3_GICD_PIDR0 (0x92)
>>>>>
>>>>>
>>>>> What is the distinction between variables with GIC[DR]_ prefixes and
>>>>> those with GICV3_GIC[DR]_ ones?
>>>>
>>>>
>>>> GICV3 is prefixed for indicating that there are values not the
>>>> addresses.
>>>> In anycase I will remove GICV3 prefixes and postfix _VAL
>>>
>>>
>>> Those value are GICV3 specific. If you drop the prefix we won't know
>>> what are their purpose...
>>
>>
>> I'm not so sure that's the case. We will know it is the value to use for
>> GICD_PIDR0 for any GIC which includes that register, which is at least
>> v3 and v4 right now. Calling it V3 is equally misleading as leaving it
>> out.
>> Given that we've decided to share the #defines across versions I think
>> we should leave the prefix off. The alternative is to make sure
>> everything is prefixed and to duplicate the definitions for each
>> version, which is an approach we previously moved away from I think, I
>> don't see a strong reason to go back on that decision now.
>
>
>
> On GICv2, this field is called ICPIDR0 (same register offset) and is equal
> to 0x90.
>
> If those values are only used for the vgic v3 driver, then they should live
> in the c files and not in the common header.
These PIDR values(not all) are used by both vgic-v3 and gicv3 driver. So those
are kept in common header file.
I plan to keep all defines without GICV3 prefix and add V3
specific one GICD_PIDR2_ARCH_V3_VAL
#define GICD_PIDR0_VAL (0x92)
#define GICD_PIDR1_VAL (0xb4)
-#define GICD_PIDR2_ARCH_VAL (0x30)
+#define GICD_PIDR2_ARCH_V3_VAL (0x3)
#define GICD_PIDR2_VAL (0x3b)
#define GICD_PIDR4_VAL (0x04)
#define GICD_PIDR2_ARCH_MASK (0xf0)
+#define GICD_PIDR2_ARCH_SHIFT (4)
#define GICR_PIDR0_VAL (0x93)
#define GICR_PIDR1_VAL GICD_PIDR1_VAL
-#define GICR_PIDR2_ARCH_VAL GICD_PIDR2_ARCH_VAL
+#define GICR_PIDR2_ARCH_V3_VAL GICD_PIDR2_ARCH_V3_VAL
#define GICR_PIDR2_VAL GICD_PIDR2_VAL
#define GICR_PIDR4_VAL GICD_PIDR4_VAL
#define GICR_PIDR2_ARCH_MASK GICD_PIDR2_ARCH_MASK
+#define GICR_PIDR2_ARCH_SHIFT GICD_PIDR2_ARCH_SHIFT
next prev parent reply other threads:[~2014-07-22 11:30 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 12:51 [PATCH v7 0/5] xen/arm: Add GICv3 support vijay.kilari
2014-07-11 12:51 ` [PATCH v7 1/5] xen/arm: Add support for GIC v3 vijay.kilari
2014-07-16 11:41 ` Ian Campbell
2014-07-22 9:48 ` Vijay Kilari
2014-07-22 10:01 ` Julien Grall
2014-07-22 10:43 ` Ian Campbell
2014-07-22 11:13 ` Julien Grall
2014-07-22 11:30 ` Vijay Kilari [this message]
2014-07-22 11:45 ` Ian Campbell
2014-07-22 10:39 ` Ian Campbell
2014-07-22 10:49 ` Vijay Kilari
2014-07-22 10:55 ` Ian Campbell
2014-07-22 11:12 ` Vijay Kilari
2014-07-22 11:15 ` Julien Grall
2014-07-22 11:19 ` Ian Campbell
2014-07-11 12:51 ` [PATCH v7 2/5] xen/arm: Add virtual GICv3 support vijay.kilari
2014-07-14 15:59 ` Julien Grall
2014-07-16 11:47 ` Ian Campbell
2014-07-16 11:56 ` Vijay Kilari
2014-07-11 12:51 ` [PATCH v7 3/5] xen/arm: Update Dom0 GIC dt node with GICv3 information vijay.kilari
2014-07-16 11:53 ` Ian Campbell
2014-07-11 12:51 ` [PATCH v7 4/5] xen/arm: add SGI handling for GICv3 vijay.kilari
2014-07-11 13:43 ` Julien Grall
2014-07-11 14:08 ` Ian Campbell
2014-07-11 14:12 ` Julien Grall
2014-07-11 14:18 ` Ian Campbell
2014-07-22 13:48 ` Stefano Stabellini
2014-07-22 14:13 ` Vijay Kilari
2014-07-23 5:48 ` Vijay Kilari
2014-07-23 10:35 ` Stefano Stabellini
2014-07-11 12:51 ` [PATCH v7 5/5] xen/arm: check for GICv3 platform support vijay.kilari
2014-07-16 12:11 ` Ian Campbell
2014-07-16 10:35 ` [PATCH v7 0/5] xen/arm: Add GICv3 support Ian Campbell
2014-07-16 11:47 ` Vijay Kilari
2014-07-16 12:38 ` Ian Campbell
2014-07-16 13:32 ` Ian Campbell
2014-07-23 10:51 ` Vijay Kilari
2014-07-23 11:31 ` Ian Campbell
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='CALicx6tDjbsLAg=p5Efbp41ribzRZ958L8azPcw4ZmbXMepaqg@mail.gmail.com' \
--to=vijay.kilari@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=julien.grall@linaro.org \
--cc=manish.jaggi@caviumnetworks.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=vijaya.kumar@caviumnetworks.com \
--cc=xen-devel@lists.xen.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).