summaryrefslogtreecommitdiff
path: root/package/boot/kexec-tools/patches/100-reduce_size.patch
blob: eafca7bf20bdd8ef4ac12eb782e7f30d8ebf17c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- a/kexec/crashdump-xen.c
+++ b/kexec/crashdump-xen.c
@@ -111,6 +111,7 @@ static int xen_detect_pv_guest(void)
  * This includes dom0, which is the only PV guest where kexec/kdump works.
  * HVM guests have to be handled as native hardware.
  */
+#if defined(__i386__) || defined(__x86_64__)
 int xen_present(void)
 {
 	if (!is_dom0) {
@@ -121,6 +122,7 @@ int xen_present(void)
 	}
 	return is_dom0 > 0;
 }
+#endif
 
 unsigned long xen_architecture(struct crash_elf_info *elf_info)
 {
--- a/kexec/crashdump.h
+++ b/kexec/crashdump.h
@@ -56,7 +56,15 @@ unsigned long crash_architecture(struct 
 unsigned long phys_to_virt(struct crash_elf_info *elf_info,
 			   unsigned long paddr);
 
+#if defined(__i386__) || defined(__x86_64__)
 int xen_present(void);
+#else
+static inline int xen_present(void)
+{
+	return 0;
+}
+#endif
+
 unsigned long xen_architecture(struct crash_elf_info *elf_info);
 int xen_get_nr_phys_cpus(void);
 int xen_get_note(int cpu, uint64_t *addr, uint64_t *len);