summaryrefslogtreecommitdiff
path: root/kexec/arch
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch')
-rw-r--r--kexec/arch/i386/crashdump-x86.c4
-rw-r--r--kexec/arch/i386/kexec-x86.c2
-rw-r--r--kexec/arch/ia64/crashdump-ia64.c4
-rw-r--r--kexec/arch/ia64/kexec-elf-ia64.c2
-rw-r--r--kexec/arch/ia64/kexec-ia64.c4
-rw-r--r--kexec/arch/ia64/kexec-iomem.c4
-rw-r--r--kexec/arch/s390/kexec-s390.c2
-rw-r--r--kexec/arch/x86_64/crashdump-x86_64.c6
-rw-r--r--kexec/arch/x86_64/kexec-x86_64.c2
9 files changed, 16 insertions, 14 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 60bd8c5..86dc166 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -59,7 +59,7 @@ static struct memory_range crash_reserved_mem;
*/
static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
{
- const char *iomem = proc_iomem(1);
+ const char *iomem = proc_iomem();
int memory_ranges = 0;
char line[MAX_LINE];
FILE *fp;
@@ -582,6 +582,6 @@ int is_crashkernel_mem_reserved(void)
{
uint64_t start, end;
- return parse_iomem_single("Crash kernel\n", 1, &start, &end) == 0 ?
+ return parse_iomem_single("Crash kernel\n", &start, &end) == 0 ?
(start != end) : 0;
}
diff --git a/kexec/arch/i386/kexec-x86.c b/kexec/arch/i386/kexec-x86.c
index c82b8ba..4a41fed 100644
--- a/kexec/arch/i386/kexec-x86.c
+++ b/kexec/arch/i386/kexec-x86.c
@@ -39,7 +39,7 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES];
int get_memory_ranges(struct memory_range **range, int *ranges,
unsigned long kexec_flags)
{
- const char *iomem= proc_iomem(kexec_flags & KEXEC_ON_CRASH);
+ const char *iomem= proc_iomem();
int memory_ranges = 0;
char line[MAX_LINE];
FILE *fp;
diff --git a/kexec/arch/ia64/crashdump-ia64.c b/kexec/arch/ia64/crashdump-ia64.c
index a1fc311..54747ac 100644
--- a/kexec/arch/ia64/crashdump-ia64.c
+++ b/kexec/arch/ia64/crashdump-ia64.c
@@ -143,7 +143,7 @@ static int exclude_crash_reserve_region(int *nr_ranges)
static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
{
- const char *iomem = proc_iomem(1);
+ const char *iomem = proc_iomem();
char line[MAX_LINE];
FILE *fp;
unsigned long start, end;
@@ -268,6 +268,6 @@ int is_crashkernel_mem_reserved(void)
{
uint64_t start, end;
- return parse_iomem_single("Crash kernel\n", 1, &start,
+ return parse_iomem_single("Crash kernel\n", &start,
&end) == 0 ? (start != end) : 0;
}
diff --git a/kexec/arch/ia64/kexec-elf-ia64.c b/kexec/arch/ia64/kexec-elf-ia64.c
index b5eab6c..8f8d239 100644
--- a/kexec/arch/ia64/kexec-elf-ia64.c
+++ b/kexec/arch/ia64/kexec-elf-ia64.c
@@ -195,7 +195,7 @@ int elf_ia64_load(int argc, char **argv, const char *buf, off_t len,
if (info->kexec_flags & KEXEC_ON_CRASH ) {
if ((mem_min == 0x00) && (mem_max == ULONG_MAX)) {
fprintf(stderr, "Failed to find crash kernel region "
- "in %s\n", proc_iomem(1));
+ "in %s\n", proc_iomem());
free_elf_info(&ehdr);
return -1;
}
diff --git a/kexec/arch/ia64/kexec-ia64.c b/kexec/arch/ia64/kexec-ia64.c
index dc0c382..97cf0ea 100644
--- a/kexec/arch/ia64/kexec-ia64.c
+++ b/kexec/arch/ia64/kexec-ia64.c
@@ -80,7 +80,7 @@ static int split_range(int range, unsigned long start, unsigned long end)
int get_memory_ranges(struct memory_range **range, int *ranges,
unsigned long kexec_flags)
{
- const char *iomem = proc_iomem(kexec_flags & KEXEC_ON_CRASH);
+ const char *iomem = proc_iomem();
char line[MAX_LINE];
FILE *fp;
fp = fopen(iomem, "r");
@@ -134,9 +134,11 @@ int get_memory_ranges(struct memory_range **range, int *ranges,
}
continue;
} else if (memcmp(str, "Boot parameter\n", 14) == 0) {
+ printf("Boot parameter\n");
memory_ranges = split_range(memory_ranges, start, end);
continue;
} else if (memcmp(str, "EFI Memory Map\n", 14) == 0) {
+ printf("EFI Memory Map\n");
memory_ranges = split_range(memory_ranges, start, end);
saved_efi_memmap_size = end - start;
continue;
diff --git a/kexec/arch/ia64/kexec-iomem.c b/kexec/arch/ia64/kexec-iomem.c
index 7696113..7fd50cd 100644
--- a/kexec/arch/ia64/kexec-iomem.c
+++ b/kexec/arch/ia64/kexec-iomem.c
@@ -13,9 +13,9 @@ static const char proc_iomem_machine_str[]= "/proc/iomem_machine";
* If Xen is in use, then /proc/iomem is used for memory regions relating
* to the currently running dom0 kernel, and /proc/iomem_machine is used
* for regions relating to the machine itself or the hypervisor.
- * If Xen is not in used, then /proc/iomem is always used.
+ * If Xen is not in used, then /proc/iomem used.
*/
-const char *proc_iomem(int machine)
+const char *proc_iomem(void)
{
if (xen_present())
return proc_iomem_machine_str;
diff --git a/kexec/arch/s390/kexec-s390.c b/kexec/arch/s390/kexec-s390.c
index e303db9..94a5d9e 100644
--- a/kexec/arch/s390/kexec-s390.c
+++ b/kexec/arch/s390/kexec-s390.c
@@ -40,7 +40,7 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES];
int get_memory_ranges(struct memory_range **range, int *ranges, unsigned long flags)
{
char sys_ram[] = "System RAM\n";
- char *iomem = proc_iomem(flags & KEXEC_ON_CRASH);
+ char *iomem = proc_iomem();
FILE *fp;
char line[80];
int current_range = 0;
diff --git a/kexec/arch/x86_64/crashdump-x86_64.c b/kexec/arch/x86_64/crashdump-x86_64.c
index 0815cf4..f40b146 100644
--- a/kexec/arch/x86_64/crashdump-x86_64.c
+++ b/kexec/arch/x86_64/crashdump-x86_64.c
@@ -61,7 +61,7 @@ static int get_kernel_paddr(struct kexec_info *info)
if (xen_present()) /* Kernel not entity mapped under Xen */
return 0;
- if (parse_iomem_single("Kernel code\n", 0, &start, NULL) == 0) {
+ if (parse_iomem_single("Kernel code\n", &start, NULL) == 0) {
info->kern_paddr_start = start;
#ifdef DEBUG
printf("kernel load physical addr start = 0x%016Lx\n", start);
@@ -164,7 +164,7 @@ static struct memory_range crash_reserved_mem;
*/
static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
{
- const char *iomem= proc_iomem(1);
+ const char *iomem= proc_iomem();
int memory_ranges = 0;
char line[MAX_LINE];
FILE *fp;
@@ -642,6 +642,6 @@ int is_crashkernel_mem_reserved(void)
{
uint64_t start, end;
- return parse_iomem_single("Crash kernel\n", 1, &start, &end) == 0 ?
+ return parse_iomem_single("Crash kernel\n", &start, &end) == 0 ?
(start != end) : 0;
}
diff --git a/kexec/arch/x86_64/kexec-x86_64.c b/kexec/arch/x86_64/kexec-x86_64.c
index c4b059e..f222ec8 100644
--- a/kexec/arch/x86_64/kexec-x86_64.c
+++ b/kexec/arch/x86_64/kexec-x86_64.c
@@ -40,7 +40,7 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES];
int get_memory_ranges(struct memory_range **range, int *ranges,
unsigned long kexec_flags)
{
- const char *iomem= proc_iomem(kexec_flags & KEXEC_ON_CRASH);
+ const char *iomem= proc_iomem();
int memory_ranges = 0;
char line[MAX_LINE];
FILE *fp;