[PATCH] kexec-ppc: fix for ksysfs crash_notes
authorAlbert Herranz <albert_herranz@yahoo.es>
Tue, 12 Jul 2005 20:58:34 +0000 (13:58 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 12 Jul 2005 23:01:03 +0000 (16:01 -0700)
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 <albert_herranz@yahoo.es>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/kernel/machine_kexec.c
include/asm-ppc/kexec.h

index 84d65a8..a727877 100644 (file)
@@ -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)
index 7319131..6d2aa0a 100644 (file)
@@ -27,6 +27,8 @@
 
 #ifndef __ASSEMBLY__
 
+extern void *crash_notes;
+
 struct kimage;
 
 extern void machine_kexec_simple(struct kimage *image);