* [PATCH] x86: Make sure E820_PM[AE]M are defined if needed
@ 2015-11-27 0:36 Simon Horman
2015-11-27 6:58 ` Baoquan He
0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2015-11-27 0:36 UTC (permalink / raw)
To: kexec; +Cc: Simon Horman, Baoquan He, Michael Holzheu, Petr Tesarik
It appears that (older?) revisions of xenctl.h define
all of the E820_* values used in kexec-x86-common.c except
E820_PMAM and E820_PMEM. This results in a build failure when
building against libxenctl.
Avoid this problem by providing local definitions of those values.
It seems reasonable to do so in the kexec-x86-common.c as
currently that is the only source file that uses the values in question.
Fixes: 56a12abc1df1 ("kexec: fix mmap return code handling")
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: Petr Tesarik <ptesarik@suse.com>
Cc: Baoquan He <bhe@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
kexec/arch/i386/kexec-x86-common.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
index b308e4719503..3e97239c0c78 100644
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -44,6 +44,12 @@
#include <xenctrl.h>
#endif /* HAVE_LIBXENCTRL */
+/* Used below but not present in (older?) xenctrl.h */
+#ifndef E820_PMEM
+#define E820_PMEM 7
+#define E820_PRAM 12
+#endif
+
static struct memory_range memory_range[MAX_MEMORY_RANGES];
/**
--
2.1.4
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] x86: Make sure E820_PM[AE]M are defined if needed
2015-11-27 0:36 [PATCH] x86: Make sure E820_PM[AE]M are defined if needed Simon Horman
@ 2015-11-27 6:58 ` Baoquan He
2015-11-29 23:53 ` Simon Horman
0 siblings, 1 reply; 3+ messages in thread
From: Baoquan He @ 2015-11-27 6:58 UTC (permalink / raw)
To: Simon Horman; +Cc: Michael Holzheu, kexec, Petr Tesarik
On 11/27/15 at 09:36am, Simon Horman wrote:
> It appears that (older?) revisions of xenctl.h define
> all of the E820_* values used in kexec-x86-common.c except
> E820_PMAM and E820_PMEM. This results in a build failure when
> building against libxenctl.
>
> Avoid this problem by providing local definitions of those values.
>
> It seems reasonable to do so in the kexec-x86-common.c as
> currently that is the only source file that uses the values in question.
>
> Fixes: 56a12abc1df1 ("kexec: fix mmap return code handling")
> Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
> Cc: Petr Tesarik <ptesarik@suse.com>
> Cc: Baoquan He <bhe@redhat.com>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> ---
> kexec/arch/i386/kexec-x86-common.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
> index b308e4719503..3e97239c0c78 100644
> --- a/kexec/arch/i386/kexec-x86-common.c
> +++ b/kexec/arch/i386/kexec-x86-common.c
> @@ -44,6 +44,12 @@
> #include <xenctrl.h>
> #endif /* HAVE_LIBXENCTRL */
>
> +/* Used below but not present in (older?) xenctrl.h */
> +#ifndef E820_PMEM
> +#define E820_PMEM 7
> +#define E820_PRAM 12
> +#endif
> +
It looks very ugly but seems no better way to do it.
> static struct memory_range memory_range[MAX_MEMORY_RANGES];
>
> /**
> --
> 2.1.4
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] x86: Make sure E820_PM[AE]M are defined if needed
2015-11-27 6:58 ` Baoquan He
@ 2015-11-29 23:53 ` Simon Horman
0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2015-11-29 23:53 UTC (permalink / raw)
To: Baoquan He; +Cc: Michael Holzheu, kexec, Petr Tesarik
On Fri, Nov 27, 2015 at 02:58:47PM +0800, Baoquan He wrote:
> On 11/27/15 at 09:36am, Simon Horman wrote:
> > It appears that (older?) revisions of xenctl.h define
> > all of the E820_* values used in kexec-x86-common.c except
> > E820_PMAM and E820_PMEM. This results in a build failure when
> > building against libxenctl.
> >
> > Avoid this problem by providing local definitions of those values.
> >
> > It seems reasonable to do so in the kexec-x86-common.c as
> > currently that is the only source file that uses the values in question.
> >
> > Fixes: 56a12abc1df1 ("kexec: fix mmap return code handling")
> > Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
> > Cc: Petr Tesarik <ptesarik@suse.com>
> > Cc: Baoquan He <bhe@redhat.com>
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > ---
> > kexec/arch/i386/kexec-x86-common.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
> > index b308e4719503..3e97239c0c78 100644
> > --- a/kexec/arch/i386/kexec-x86-common.c
> > +++ b/kexec/arch/i386/kexec-x86-common.c
> > @@ -44,6 +44,12 @@
> > #include <xenctrl.h>
> > #endif /* HAVE_LIBXENCTRL */
> >
> > +/* Used below but not present in (older?) xenctrl.h */
> > +#ifndef E820_PMEM
> > +#define E820_PMEM 7
> > +#define E820_PRAM 12
> > +#endif
> > +
>
> It looks very ugly but seems no better way to do it.
Agreed. I've applied this change.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-29 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 0:36 [PATCH] x86: Make sure E820_PM[AE]M are defined if needed Simon Horman
2015-11-27 6:58 ` Baoquan He
2015-11-29 23:53 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox