* [PATCH] kexec: provide crashinfo_maxaddr_bits if !CONFIG_KEXEC
@ 2012-03-19 14:15 David Vrabel
2012-03-19 14:28 ` Andrew Cooper
0 siblings, 1 reply; 2+ messages in thread
From: David Vrabel @ 2012-03-19 14:15 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, David Vrabel
From: David Vrabel <david.vrabel@citrix.com>
Fix the build where !CONFIG_KEXEC (e.g., arm) by providing a default
crashinfo_maxaddr_bits.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
Andy,
A cleaner fix might be to replace MEMF_bits(crashinfo_max_addr_bits)
with a function (e.g., crashinfo_mem_flags()), and provide an inline
stub when !CONFIG_KEXEC.
David
---
xen/drivers/char/console.c | 2 --
xen/include/xen/kexec.h | 8 ++++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 5cbbf81..e10bed5 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -22,9 +22,7 @@
#include <xen/guest_access.h>
#include <xen/shutdown.h>
#include <xen/vga.h>
-#ifdef CONFIG_KEXEC
#include <xen/kexec.h>
-#endif
#include <asm/debugger.h>
#include <asm/div64.h>
#include <xen/hypercall.h> /* for do_console_io */
diff --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h
index 8e9c1d3..b3ca8b0 100644
--- a/xen/include/xen/kexec.h
+++ b/xen/include/xen/kexec.h
@@ -1,6 +1,8 @@
#ifndef __XEN_KEXEC_H__
#define __XEN_KEXEC_H__
+#ifdef CONFIG_KEXEC
+
#include <public/kexec.h>
#include <asm/percpu.h>
#include <xen/elfcore.h>
@@ -76,6 +78,12 @@ void vmcoreinfo_append_str(const char *fmt, ...)
vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
(unsigned long)offsetof(struct name, sub.field))
+#else /* !CONFIG_KEXEC */
+
+#define crashinfo_maxaddr_bits 0
+
+#endif
+
#endif /* __XEN_KEXEC_H__ */
/*
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] kexec: provide crashinfo_maxaddr_bits if !CONFIG_KEXEC
2012-03-19 14:15 [PATCH] kexec: provide crashinfo_maxaddr_bits if !CONFIG_KEXEC David Vrabel
@ 2012-03-19 14:28 ` Andrew Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2012-03-19 14:28 UTC (permalink / raw)
To: David Vrabel; +Cc: xen-devel@lists.xensource.com
On 19/03/12 14:15, David Vrabel wrote:
> From: David Vrabel <david.vrabel@citrix.com>
>
> Fix the build where !CONFIG_KEXEC (e.g., arm) by providing a default
> crashinfo_maxaddr_bits.
>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> Andy,
>
> A cleaner fix might be to replace MEMF_bits(crashinfo_max_addr_bits)
> with a function (e.g., crashinfo_mem_flags()), and provide an inline
> stub when !CONFIG_KEXEC.
>
> David
> ---
> xen/drivers/char/console.c | 2 --
> xen/include/xen/kexec.h | 8 ++++++++
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> index 5cbbf81..e10bed5 100644
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -22,9 +22,7 @@
> #include <xen/guest_access.h>
> #include <xen/shutdown.h>
> #include <xen/vga.h>
> -#ifdef CONFIG_KEXEC
> #include <xen/kexec.h>
> -#endif
> #include <asm/debugger.h>
> #include <asm/div64.h>
> #include <xen/hypercall.h> /* for do_console_io */
> diff --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h
> index 8e9c1d3..b3ca8b0 100644
> --- a/xen/include/xen/kexec.h
> +++ b/xen/include/xen/kexec.h
> @@ -1,6 +1,8 @@
> #ifndef __XEN_KEXEC_H__
> #define __XEN_KEXEC_H__
>
> +#ifdef CONFIG_KEXEC
> +
> #include <public/kexec.h>
> #include <asm/percpu.h>
> #include <xen/elfcore.h>
> @@ -76,6 +78,12 @@ void vmcoreinfo_append_str(const char *fmt, ...)
> vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
> (unsigned long)offsetof(struct name, sub.field))
>
> +#else /* !CONFIG_KEXEC */
> +
> +#define crashinfo_maxaddr_bits 0
> +
> +#endif
> +
> #endif /* __XEN_KEXEC_H__ */
>
> /*
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-19 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 14:15 [PATCH] kexec: provide crashinfo_maxaddr_bits if !CONFIG_KEXEC David Vrabel
2012-03-19 14:28 ` Andrew Cooper
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).