[PATCH] x86/xen: Build memory type conversion code conditionally

Daniel Kiper daniel.kiper at oracle.com
Sat Nov 28 12:17:18 PST 2015


Xen is not aware of E820_PMEM and E820_PRAM memory types, so, build
simply fails. Hence, build code referencing them conditionally.

Signed-off-by: Daniel Kiper <daniel.kiper at oracle.com>
---
 kexec/arch/i386/kexec-x86-common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
index b308e47..21f8543 100644
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -156,10 +156,14 @@ unsigned xen_e820_to_kexec_type(uint32_t type)
 			return RANGE_ACPI;
 		case E820_NVS:
 			return RANGE_ACPI_NVS;
+#ifdef E820_PMEM
 		case E820_PMEM:
 			return RANGE_PMEM;
+#endif
+#ifdef E820_PRAM
 		case E820_PRAM:
 			return RANGE_PRAM;
+#endif
 		case E820_RESERVED:
 		default:
 			return RANGE_RESERVED;
-- 
1.7.10.4




More information about the kexec mailing list