Skip to contentSkip to conversation

x86/xen: Build memory type conversion code conditionally

PATCH In review Daniel Kiper 2 participants 5 messages Nov 28, 2015 – Nov 30, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/xen: Build memory type conversion code conditionally

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

---
 kexec/arch/i386/kexec-x86-common.c |    4 ++++
 1 file changed, 4 insertions(+)
kexec/arch/i386/kexec-x86-common.c +4 -0
index b308e47..21f8543 100644
@@ -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;
Signature · 7 lines
1.7.10.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw
Quoted 4 lines · Daniel Kiper

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

I believe this is fixed by
"x86: Make sure E820_PM[AE]M are defined if needed" which I applied a few moments ago.

#2 lore raw
In reply to Daniel Kiper
Quoted 4 lines · Daniel Kiper

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

I believe this is fixed by
"x86: Make sure E820_PM[AE]M are defined if needed" which I applied a few moments ago.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
Quoted 9 lines · Simon Horman
Quoted 4 lines · Daniel Kiper

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

I believe this is fixed by
"x86: Make sure E820_PM[AE]M are defined if needed" which I applied a few moments ago.

Yep, it works. However, I think that separate #ifdef should be for E820_PMEM and E820_PRAM. Just my $0.05.

Daniel

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
In reply to Simon Horman
Quoted 9 lines · Simon Horman
Quoted 4 lines · Daniel Kiper

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

I believe this is fixed by
"x86: Make sure E820_PM[AE]M are defined if needed" which I applied a few moments ago.

Yep, it works. However, I think that separate #ifdef should be for E820_PMEM and E820_PRAM. Just my $0.05.

Daniel