projects/linux·commit bc75a245

[PATCH] kexec-ppc: fix for ksysfs crash_notes

bc75a245 · Albert Herranz <[email protected]> · 2005-07-12 13:58:34 -07:00

The following patch prevents the crash dump helper code found within kexec
from breaking ppc which still lacks crash dump functionality.

ksysfs crash_notes attribute handling was left under CONFIG_KEXEC for
simplicity although it is not strictly kexec related.

We provide here a dummy definition for crash_notes on ppc.

Signed-off-by: Albert Herranz <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Vivek Goyal <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
bc75a24582f60a70e2b95fda94ff66f577b7a0db
Parents
41e2e8be

Changes

2 files changed · +8 −0

FileStatusAddDelContent
arch/ppc/kernel/machine_kexec.cmodified+6−0View file
include/asm-ppc/kexec.hmodified+2−0View file

arch/ppc/kernel/machine_kexec.c

View file
diff --git a/arch/ppc/kernel/machine_kexec.c b/arch/ppc/kernel/machine_kexec.c
index 84d65a8..a727877 100644
--- a/arch/ppc/kernel/machine_kexec.c
+++ b/arch/ppc/kernel/machine_kexec.c
@@ -28,6 +28,12 @@ typedef NORET_TYPE void (*relocate_new_kernel_t)(
const extern unsigned char relocate_new_kernel[];
const extern unsigned int relocate_new_kernel_size;
+/*
+ * Provide a dummy crash_notes definition while crash dump arrives to ppc.
+ * This prevents breakage of crash_notes attribute in kernel/ksysfs.c.
+ */
+void *crash_notes = NULL;
+
void machine_shutdown(void)
{
if (ppc_md.machine_shutdown)

include/asm-ppc/kexec.h

View file
diff --git a/include/asm-ppc/kexec.h b/include/asm-ppc/kexec.h
index 7319131..6d2aa0a 100644
--- a/include/asm-ppc/kexec.h
+++ b/include/asm-ppc/kexec.h
@@ -27,6 +27,8 @@
#ifndef __ASSEMBLY__
+extern void *crash_notes;
+
struct kimage;
extern void machine_kexec_simple(struct kimage *image);