xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "lra@sics.se" <lra@sics.se>
Cc: Lars Rasmusson <Lars.Rasmusson@sics.se>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] The BUG() macro should print the correct architecture, not a hardcoded value.
Date: Fri, 11 Jan 2013 13:20:28 +0000	[thread overview]
Message-ID: <50F0119C.8090909@citrix.com> (raw)
In-Reply-To: <1357910148-29868-1-git-send-email-lra@sics.se>

On 11/01/13 13:15, lra@sics.se wrote:
> From: Lars Rasmusson <Lars.Rasmusson@sics.se>
>
> Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>
> ---
>  xen/arch/arm/traps.c |   18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index f42e4e9..1909abf 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -68,7 +68,23 @@ static void print_xen_info(void)
>      debug = 'y';
>  #endif
>  
> -    printk("----[ Xen-%d.%d%s  x86_64  debug=%c  %s ]----\n",
> +#ifdef CONFIG_ARM_32
> +#define THE_ARCH "arm_32"
> +#elif CONFIG_ARM_64
> +#define THE_ARCH "arm_64"
> +#elif CONFIG_ARM
> +#define THE_ARCH "arm"
> +#elif CONFIG_X86_32
> +#define THE_ARCH "x86_32"
> +#elif CONFIG_X86_64
> +#define THE_ARCH "x86_64"
> +#elif CONFIG_X86
> +#define THE_ARCH "x86"
> +#else      
> +#define THE_ARCH "unknown_arch"
> +#endif

The value should not be x86_64, but this is not the correct way to get
the architecture.  In xen/arch/arm, you can be certain that the arch is
not unknown, nor is it any x86.

~Andrew

> +
> +    printk("----[ Xen-%d.%d%s  " THE_ARCH "  debug=%c  %s ]----\n",
>             xen_major_version(), xen_minor_version(), xen_extra_version(),
>             debug, print_tainted(taint_str));
>  }

  parent reply	other threads:[~2013-01-11 13:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 13:15 [PATCH] The BUG() macro should print the correct architecture, not a hardcoded value lra
2013-01-11 13:20 ` Ian Campbell
2013-01-11 13:23   ` Andrew Cooper
2013-01-11 13:20 ` Andrew Cooper [this message]
2013-01-24 13:00 ` 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=50F0119C.8090909@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Lars.Rasmusson@sics.se \
    --cc=lra@sics.se \
    --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).