summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kexec/arch/ia64/crashdump-ia64.c9
-rw-r--r--kexec/arch/ppc/kexec-ppc.c8
-rw-r--r--kexec/arch/s390/kexec-s390.c9
-rw-r--r--kexec/kexec.c7
-rw-r--r--kexec/kexec.h1
5 files changed, 33 insertions, 1 deletions
diff --git a/kexec/arch/ia64/crashdump-ia64.c b/kexec/arch/ia64/crashdump-ia64.c
index d2d20af..39cd4f1 100644
--- a/kexec/arch/ia64/crashdump-ia64.c
+++ b/kexec/arch/ia64/crashdump-ia64.c
@@ -348,4 +348,11 @@ int load_crashdump_segments(struct kexec_info *info, struct mem_ehdr *ehdr,
return 0;
}
-
+/*
+ * Adding a dummy function, so that build on IA64 will not break.
+ * Need to implement the actual checking code
+ */
+int is_crashkernel_mem_reserved(void)
+{
+ return 1;
+}
diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c
index 16ea584..f42b434 100644
--- a/kexec/arch/ppc/kexec-ppc.c
+++ b/kexec/arch/ppc/kexec-ppc.c
@@ -149,3 +149,11 @@ void arch_update_purgatory(struct kexec_info *info)
{
}
+/*
+ * Adding a dummy function, so that build on PPC will not break.
+ * Need to implement the actual checking code
+ */
+int is_crashkernel_mem_reserved(void)
+{
+ return 1;
+}
diff --git a/kexec/arch/s390/kexec-s390.c b/kexec/arch/s390/kexec-s390.c
index e90ae93..b778620 100644
--- a/kexec/arch/s390/kexec-s390.c
+++ b/kexec/arch/s390/kexec-s390.c
@@ -102,3 +102,12 @@ int arch_compat_trampoline(struct kexec_info *info)
void arch_update_purgatory(struct kexec_info *info)
{
}
+
+/*
+ * Adding a dummy function, so that build on s390 will not break.
+ * Need to implement the actual checking code
+ */
+int is_crashkernel_mem_reserved(void)
+{
+ return 1;
+}
diff --git a/kexec/kexec.c b/kexec/kexec.c
index ce0663e..204a4b8 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -848,6 +848,13 @@ int main(int argc, char *argv[])
}
}
+ if ((kexec_flags & KEXEC_ON_CRASH) && !is_crashkernel_mem_reserved()) {
+ printf("Memory for crashkernel is not reserved\n");
+ printf("Please reserve memory by passing ");
+ printf("\"crashkernel=X@Y\" parameter to the kernel\n");
+ die("Then try loading kdump kernel\n");
+ }
+
fileind = optind;
/* Reset getopt for the next pass; called in other source modules */
opterr = 1;
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 1cee900..d6942bf 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -199,6 +199,7 @@ void arch_usage(void);
int arch_process_options(int argc, char **argv);
int arch_compat_trampoline(struct kexec_info *info);
void arch_update_purgatory(struct kexec_info *info);
+int is_crashkernel_mem_reserved(void);
#define MAX_LINE 160
#endif /* KEXEC_H */