* [PATCH] The BUG() macro should print the correct architecture, not a hardcoded value.
@ 2013-01-11 13:15 lra
2013-01-11 13:20 ` Ian Campbell
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: lra @ 2013-01-11 13:15 UTC (permalink / raw)
To: xen-devel; +Cc: Lars Rasmusson
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
+
+ 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));
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] The BUG() macro should print the correct architecture, not a hardcoded value.
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
2013-01-24 13:00 ` Ian Campbell
2 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2013-01-11 13:20 UTC (permalink / raw)
To: lra@sics.se; +Cc: Lars Rasmusson, xen-devel@lists.xen.org
On Fri, 2013-01-11 at 13:15 +0000, 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",
Oops!
> +#ifdef CONFIG_ARM_32
> +#define THE_ARCH "arm_32"
> +#elif CONFIG_ARM_64
> +#define THE_ARCH "arm_64"
Since this is xen/arch/*arm*/traps.c you only need to handle these two
cases.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] The BUG() macro should print the correct architecture, not a hardcoded value.
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:20 ` Andrew Cooper
2013-01-24 13:00 ` Ian Campbell
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2013-01-11 13:20 UTC (permalink / raw)
To: lra@sics.se; +Cc: Lars Rasmusson, xen-devel@lists.xen.org
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));
> }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] The BUG() macro should print the correct architecture, not a hardcoded value.
2013-01-11 13:20 ` Ian Campbell
@ 2013-01-11 13:23 ` Andrew Cooper
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2013-01-11 13:23 UTC (permalink / raw)
To: Ian Campbell; +Cc: Lars Rasmusson, lra@sics.se, xen-devel@lists.xen.org
On 11/01/13 13:20, Ian Campbell wrote:
> On Fri, 2013-01-11 at 13:15 +0000, 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",
> Oops!
>
>> +#ifdef CONFIG_ARM_32
>> +#define THE_ARCH "arm_32"
>> +#elif CONFIG_ARM_64
>> +#define THE_ARCH "arm_64"
> Since this is xen/arch/*arm*/traps.c you only need to handle these two
> cases.
>
> Ian.
Is there not a -D available from the Makefiles which would be
appropriate, to save having to change this every time a new architecture
is added?
~Andrew
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] The BUG() macro should print the correct architecture, not a hardcoded value.
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:20 ` Andrew Cooper
@ 2013-01-24 13:00 ` Ian Campbell
2 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2013-01-24 13:00 UTC (permalink / raw)
To: lra@sics.se; +Cc: Lars Rasmusson, xen-devel@lists.xen.org
On Fri, 2013-01-11 at 13:15 +0000, lra@sics.se wrote:
> From: Lars Rasmusson <Lars.Rasmusson@sics.se>
>
> Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>
I applied the alternative patch I posted in
<1358959552-21737-1-git-send-email-ian.campbell@citrix.com>
You were supposed to be CCd on that, but the Reported-by tag didn't
cause that to happen automatically like I expected, sorry.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-24 13:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-01-24 13:00 ` Ian Campbell
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).