[PATCH] Kdump: powerpc and s390 build failure fix

From: Vivek Goyal
Date: Fri Nov 18 2005 - 07:33:03 EST


Hi Andrew,

I realized that my recent kdump postings will break powerpc and s390 build if
CONFIG_KEXEC=y. Attached is the patch to fix it. Patch is diffed against
2.6.15-rc1-mm2.

Thanks
Vivek



o crash_setup_regs() is an architecture dependent function which is called
in architecture independent section. So every architecture supporting
kexec should at least provide a dummy definition of crash_setup_regs() even
if crash dumping is not implemented yet, to avoid build failures.

Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
---

linux-2.6.15-rc1-mm2-1M-root/include/asm-powerpc/kexec.h | 6 ++++++
linux-2.6.15-rc1-mm2-1M-root/include/asm-s390/kexec.h | 4 ++++
2 files changed, 10 insertions(+)

diff -puN include/asm-powerpc/kexec.h~kdump-powerpc-s390-build-breakage-fix include/asm-powerpc/kexec.h
--- linux-2.6.15-rc1-mm2-1M/include/asm-powerpc/kexec.h~kdump-powerpc-s390-build-breakage-fix 2005-11-18 16:08:31.000000000 +0530
+++ linux-2.6.15-rc1-mm2-1M-root/include/asm-powerpc/kexec.h 2005-11-18 16:08:31.000000000 +0530
@@ -43,5 +43,11 @@ struct kimage;
extern void machine_kexec_simple(struct kimage *image);
#endif

+/*
+ * Provide a dummy definition to avoid build failures. Will remain
+ * empty till crash dump support is enabled.
+ */
+static inline void crash_setup_regs(struct pt_regs *newregs,
+ struct pt_regs *oldregs) { }
#endif /* ! __ASSEMBLY__ */
#endif /* _ASM_POWERPC_KEXEC_H */
diff -puN include/asm-s390/kexec.h~kdump-powerpc-s390-build-breakage-fix include/asm-s390/kexec.h
--- linux-2.6.15-rc1-mm2-1M/include/asm-s390/kexec.h~kdump-powerpc-s390-build-breakage-fix 2005-11-18 16:08:31.000000000 +0530
+++ linux-2.6.15-rc1-mm2-1M-root/include/asm-s390/kexec.h 2005-11-18 16:08:31.000000000 +0530
@@ -36,4 +36,8 @@

#define MAX_NOTE_BYTES 1024

+/* Provide a dummy definition to avoid build failures. */
+static inline void crash_setup_regs(struct pt_regs *newregs,
+ struct pt_regs *oldregs) { }
+
#endif /*_S390_KEXEC_H */
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/