diff options
author | Simon Horman <horms@verge.net.au> | 2007-05-09 19:26:16 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2007-10-17 12:17:28 +0900 |
commit | 6dfe4858e2db01b49d52a4cf2bb0dce18324d787 (patch) | |
tree | 8a2351a8ad7de5869d044c25a7b62d5d0ad7176c /kexec/crashdump-xen.c | |
parent | de12fd1c7133edfc4be1d94f63295e30ae1dc526 (diff) |
Allow architectures to specify the location of /proc/iomem
On ia64 XEN it is sometimes neccessary to use an alternate location for the
information that is usually provided by /proc/iomem. By having the path
returned by a function, which can be overriden on a per-architecture basis,
it is possible for ia64 XEN to make use of existing generic code. Hopefully
other achitectures can use this infastructure as the need arises.
If the machine parameter is zero, then iomem file relating to the currently
running kernel should be returned. If the machine parameter is non-zero
then iomem file, relating to the underlying hypervisor, should be returned.
In the simple case, these will be the same file.
Signed-off-by: Simon Horman <horms@verge.net.au>
kexec/arch/i386/crashdump-x86.c | 4 ++--
kexec/arch/i386/kexec-x86.c | 2 +-
kexec/arch/i386/x86-linux-setup.c | 2 +-
kexec/arch/ia64/crashdump-ia64.c | 9 +++++----
kexec/arch/ia64/kexec-elf-ia64.c | 2 +-
kexec/arch/ia64/kexec-ia64.c | 5 +++--
kexec/arch/ppc/kexec-ppc.c | 2 +-
kexec/arch/s390/kexec-s390.c | 5 +++--
kexec/arch/x86_64/crashdump-x86_64.c | 10 +++++-----
kexec/arch/x86_64/kexec-x86_64.c | 2 +-
kexec/crashdump-xen.c | 6 ++++--
kexec/kexec-iomem.c | 31 +++++++++++++++++++++++--------
kexec/kexec.h | 6 +++---
13 files changed, 53 insertions(+), 33 deletions(-)
9079040b40f643cfc9eb3d425dffa0ca8fd573e1
Diffstat (limited to 'kexec/crashdump-xen.c')
-rw-r--r-- | kexec/crashdump-xen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c index fcef9db..4d6a25d 100644 --- a/kexec/crashdump-xen.c +++ b/kexec/crashdump-xen.c @@ -12,6 +12,7 @@ #include <fcntl.h> #include "kexec.h" #include "crashdump.h" +#include "kexec-syscall.h" #ifdef HAVE_XENCTRL_H #include <xenctrl.h> @@ -90,7 +91,7 @@ int xen_get_nr_phys_cpus(void) if (xen_phys_cpus) return xen_phys_cpus; - if ((cpus = kexec_iomem_for_each_line(match, NULL, NULL))) { + if ((cpus = kexec_iomem_for_each_line(match, 1, NULL, NULL))) { n = sizeof(struct crash_note_info) * cpus; xen_phys_notes = malloc(n); if (!xen_phys_notes) { @@ -98,7 +99,8 @@ int xen_get_nr_phys_cpus(void) return -1; } memset(xen_phys_notes, 0, n); - kexec_iomem_for_each_line(match, xen_crash_note_callback, NULL); + kexec_iomem_for_each_line(match, 1, + xen_crash_note_callback, NULL); xen_phys_cpus = cpus; } |