forked from immortalwrt/immortalwrt
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Felix Fietkau <[email protected]> SVN-Revision: 37072
- Loading branch information
Felix Fietkau
committed
Jun 28, 2013
1 parent
ea5f9a7
commit 512a3c5
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); |