From: Julien Grall <julien.grall@linaro.org>
To: vijay.kilari@gmail.com, Ian.Campbell@citrix.com,
stefano.stabellini@eu.citrix.com, stefano.stabellini@citrix.com,
tim@xen.org, jbeulich@suse.com, xen-devel@lists.xen.org
Cc: Prasun.Kapoor@caviumnetworks.com,
vijaya.kumar@caviumnetworks.com, manish.jaggi@caviumnetworks.com
Subject: Re: [PATCH v8 2/7] xen/arm: Stringify the register name in sysreg read write macros
Date: Wed, 23 Jul 2014 18:20:48 +0100 [thread overview]
Message-ID: <53CFEEF0.2020300@linaro.org> (raw)
In-Reply-To: <1406122913-8303-3-git-send-email-vijay.kilari@gmail.com>
Hi Vijay,
On 07/23/2014 02:41 PM, vijay.kilari@gmail.com wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>
> The register name parameter in {READ,WRITE}_SYSREG{32,64}
> macros is replaced as register name in mrs and msr assembly
> instruction.
>
> If this register name is macro indirection, the register
> name is not replaced with designated macro. So replace the register
> name with __stringify macro, which replaces register name
> if it is macro
>
> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Regards,
> ---
> xen/include/asm-arm/arm64/processor.h | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/xen/include/asm-arm/arm64/processor.h b/xen/include/asm-arm/arm64/processor.h
> index 5bf0867..3a9c0cd 100644
> --- a/xen/include/asm-arm/arm64/processor.h
> +++ b/xen/include/asm-arm/arm64/processor.h
> @@ -1,6 +1,8 @@
> #ifndef __ASM_ARM_ARM64_PROCESSOR_H
> #define __ASM_ARM_ARM64_PROCESSOR_H
>
> +#include <xen/stringify.h>
> +
> #ifndef __ASSEMBLY__
>
> /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
> @@ -85,20 +87,20 @@ struct cpu_user_regs
>
> #define READ_SYSREG32(name) ({ \
> uint32_t _r; \
> - asm volatile("mrs %0, "#name : "=r" (_r)); \
> + asm volatile("mrs %0, "__stringify(name) : "=r" (_r)); \
> _r; })
> #define WRITE_SYSREG32(v, name) do { \
> uint32_t _r = v; \
> - asm volatile("msr "#name", %0" : : "r" (_r)); \
> + asm volatile("msr "__stringify(name)", %0" : : "r" (_r)); \
> } while (0)
>
> #define WRITE_SYSREG64(v, name) do { \
> uint64_t _r = v; \
> - asm volatile("msr "#name", %0" : : "r" (_r)); \
> + asm volatile("msr "__stringify(name)", %0" : : "r" (_r)); \
> } while (0)
> #define READ_SYSREG64(name) ({ \
> uint64_t _r; \
> - asm volatile("mrs %0, "#name : "=r" (_r)); \
> + asm volatile("mrs %0, "__stringify(name) : "=r" (_r)); \
> _r; })
>
> #define READ_SYSREG(name) READ_SYSREG64(name)
>
--
Julien Grall
next prev parent reply other threads:[~2014-07-23 17:20 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 13:41 [PATCH v8 0/7] xen/arm: Add GICv3 support vijay.kilari
2014-07-23 13:41 ` [PATCH v8 1/7] xen/arm: Introduce sizes.h vijay.kilari
2014-07-28 13:55 ` Ian Campbell
2014-07-23 13:41 ` [PATCH v8 2/7] xen/arm: Stringify the register name in sysreg read write macros vijay.kilari
2014-07-23 17:20 ` Julien Grall [this message]
2014-07-28 13:56 ` Ian Campbell
2014-07-23 13:41 ` [PATCH v8 3/7] xen/arm: Add support for GIC v3 vijay.kilari
2014-07-23 17:28 ` Julien Grall
2014-07-24 9:03 ` Ian Campbell
2014-07-24 10:26 ` Julien Grall
2014-07-23 13:41 ` [PATCH v8 4/7] xen/arm: Add virtual GICv3 support vijay.kilari
2014-07-23 13:51 ` Vijay Kilari
2014-07-28 14:35 ` Ian Campbell
2014-07-28 14:55 ` Ian Campbell
2014-07-28 15:08 ` Julien Grall
2014-07-28 15:26 ` Ian Campbell
2014-07-28 15:29 ` Julien Grall
2014-07-28 15:35 ` Julien Grall
2014-07-28 16:02 ` Ian Campbell
2014-07-28 16:11 ` Julien Grall
2014-07-28 16:25 ` Ian Campbell
2014-07-28 16:30 ` Julien Grall
2014-07-23 13:41 ` [PATCH v8 5/7] xen/arm: Update Dom0 GIC dt node with GICv3 information vijay.kilari
2014-07-23 13:41 ` [PATCH v8 6/7] xen/arm: add SGI handling for GICv3 vijay.kilari
2014-07-23 13:56 ` Stefano Stabellini
2014-07-24 14:37 ` Julien Grall
2014-07-28 14:04 ` Ian Campbell
2014-07-23 13:41 ` [PATCH v8 7/7] xen/arm: check for GICv3 platform support vijay.kilari
2014-07-24 14:45 ` Julien Grall
2014-08-03 21:24 ` [PATCH v8 0/7] xen/arm: Add GICv3 support Julien Grall
2014-08-04 10:06 ` Ian Campbell
2014-08-04 10:25 ` Julien Grall
2014-08-04 10:42 ` Ian Campbell
[not found] ` <CALicx6ucRFNP4A3a2uBPTmhYzKtNWNOvwmPLUfy4Z2DoYDVr3g@mail.gmail.com>
2014-08-04 15:48 ` Ian Campbell
2014-08-06 14:52 ` Vijay Kilari
2014-08-07 14:11 ` Julien Grall
2014-08-28 11:36 ` Vijay Kilari
2014-09-02 23:18 ` Stefano Stabellini
2014-09-03 12:15 ` 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=53CFEEF0.2020300@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=jbeulich@suse.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).