From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Vijay Kilari <vijay.kilari@gmail.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: [RFC PATCH] xen/arm: check on domain type against hardware support
Date: Mon, 29 Sep 2014 13:42:58 +0100 [thread overview]
Message-ID: <542953D2.4000003@linaro.org> (raw)
In-Reply-To: <1411994131.3801.11.camel@citrix.com>
On 09/29/2014 01:35 PM, Ian Campbell wrote:
>>>> I propose cpu_has_aarch32 to check for both A32 and T32. If any one
>>>> (A32/T32) is set we
>>>> can assume that aarch32 is supported. For ARM64 that supports only
>>>> Aarch64 ID_PFR0_EL1 is RES0. so this check for T32 | A32 should work.
>>>> Something like this
>>>>
>>>> diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeature.h
>>>> index 7a6d3de..379e366 100644
>>>> --- a/xen/include/asm-arm/cpufeature.h
>>>> +++ b/xen/include/asm-arm/cpufeature.h
>>>> @@ -22,7 +22,9 @@
>>>> #define boot_cpu_feature32(feat) (boot_cpu_data.pfr32.feat)
>>>>
>>>> -#define cpu_has_aarch32 (boot_cpu_feature32(arm) == 1)
>>>> +#define cpu_has_a32 ((boot_cpu_feature32(arm) == 1)
>>>> #define cpu_has_thumb (boot_cpu_feature32(thumb) >= 1)
>>>> +#define cpu_has_aarch32 (cpu_has_a32 || cpu_has_thumb)
>>>
>>> Yes, this looks like what is needed, thanks.
>>
>> Following my comment above, I don't think this change is necessary.
>
> Iff you are right about v8. You are probably right but it's not 100%
> clear. On the other hand checking for what we actually mean has no
> downside.
The downside is name readability for the developer as the term A32 has
been introduced on ARMv8.
With only the ARMv7 spec the name is very confusing. I had to read the
ARMv8 spec to completely understand the name and the different between
aarch32 and a32.
I would at least add a comment on top of cpu_has_a32.
Regards,
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-09-29 12:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 12:13 [PATCH] xen/arm: Use REG_RANK_INDEX macro vijay.kilari
2014-09-18 12:13 ` [RFC PATCH] xen/arm: check on domain type against hardware support vijay.kilari
2014-09-23 16:31 ` Ian Campbell
2014-09-25 8:31 ` Vijay Kilari
2014-09-25 11:08 ` Ian Campbell
2014-09-29 12:18 ` Julien Grall
2014-09-29 12:35 ` Ian Campbell
2014-09-29 12:42 ` Julien Grall [this message]
2014-09-18 12:13 ` [RFC PATCH] xen/arm: Restricted access to IFSR32_EL2 and FPEXC32_EL2 vijay.kilari
2014-09-23 16:32 ` Ian Campbell
2014-09-24 9:00 ` Ian Campbell
2014-09-18 12:13 ` [RFC PATCH] xen/arm: remove check for generic timer support for arm64 vijay.kilari
2014-09-23 16:33 ` Ian Campbell
2014-09-24 9:00 ` Ian Campbell
2014-09-23 16:19 ` [PATCH] xen/arm: Use REG_RANK_INDEX macro Ian Campbell
2014-09-23 16:45 ` Stefano Stabellini
2014-09-24 8:59 ` 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=542953D2.4000003@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=manish.jaggi@caviumnetworks.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=vijay.kilari@gmail.com \
--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).