Re: [Fastboot] [1/2] kdump: Use real pt_regs from exception

From: Alexander Nyberg
Date: Wed May 25 2005 - 07:17:37 EST


ons 2005-05-25 klockan 02:07 -0700 skrev Andrew Morton:
> Alexander Nyberg <alexn@xxxxxxxxx> wrote:
> >
> > -extern void machine_crash_shutdown(void);
> > +extern void machine_crash_shutdown(struct pt_regs *);
>
> That'll break x86_64, ppc, ppc64 and s/390.

I'm such an idiot.

Make sure all arches take pt_regs * as argument to
machine_crash_shutdown(). (now cross-compiled on above arches except
s/390).


Signed-off-by: Alexander Nyberg <alexn@xxxxxxxxx>

Index: mm/arch/ppc/kernel/machine_kexec.c
===================================================================
--- mm.orig/arch/ppc/kernel/machine_kexec.c 2005-05-25 13:17:41.000000000 +0200
+++ mm/arch/ppc/kernel/machine_kexec.c 2005-05-25 13:18:06.000000000 +0200
@@ -34,7 +34,7 @@
}
}

-void machine_crash_shutdown(void)
+void machine_crash_shutdown(struct pt_regs *regs)
{
if (ppc_md.machine_crash_shutdown) {
ppc_md.machine_crash_shutdown();
Index: mm/arch/x86_64/kernel/crash.c
===================================================================
--- mm.orig/arch/x86_64/kernel/crash.c 2005-05-25 13:13:18.000000000 +0200
+++ mm/arch/x86_64/kernel/crash.c 2005-05-25 13:15:44.000000000 +0200
@@ -22,7 +22,7 @@

note_buf_t crash_notes[NR_CPUS];

-void machine_crash_shutdown(void)
+void machine_crash_shutdown(struct pt_regs *regs)
{
/* This function is only called after the system
* has paniced or is otherwise in a critical state.
Index: mm/arch/s390/kernel/crash.c
===================================================================
--- mm.orig/arch/s390/kernel/crash.c 2005-05-25 13:13:18.000000000 +0200
+++ mm/arch/s390/kernel/crash.c 2005-05-25 13:15:58.000000000 +0200
@@ -12,6 +12,6 @@

note_buf_t crash_notes[NR_CPUS];

-void machine_crash_shutdown(void)
+void machine_crash_shutdown(struct pt_regs *regs)
{
}
Index: mm/arch/ppc64/kernel/machine_kexec.c
===================================================================
--- mm.orig/arch/ppc64/kernel/machine_kexec.c 2005-05-25 13:13:18.000000000 +0200
+++ mm/arch/ppc64/kernel/machine_kexec.c 2005-05-25 13:15:07.000000000 +0200
@@ -34,7 +34,7 @@
* and if what it will achieve. Letting it be now to compile the code
* in generic kexec environment
*/
-void machine_crash_shutdown(void)
+void machine_crash_shutdown(struct pt_regs *regs)
{
/* do nothing right now */
/* smp_relase_cpus() if we want smp on panic kernel */
Index: mm/include/linux/reboot.h
===================================================================
--- mm.orig/include/linux/reboot.h 2005-05-25 13:13:39.000000000 +0200
+++ mm/include/linux/reboot.h 2005-05-25 13:51:49.000000000 +0200
@@ -52,6 +52,7 @@
extern void machine_power_off(void);

extern void machine_shutdown(void);
+struct pt_regs;
extern void machine_crash_shutdown(struct pt_regs *);

#endif
Index: mm/include/linux/kexec.h
===================================================================
--- mm.orig/include/linux/kexec.h 2005-05-25 13:13:39.000000000 +0200
+++ mm/include/linux/kexec.h 2005-05-25 13:47:47.000000000 +0200
@@ -124,6 +124,8 @@
extern struct resource crashk_res;

#else /* !CONFIG_KEXEC */
+struct pt_regs;
+struct task_struct;
static inline void crash_kexec(struct pt_regs *regs) { }
static inline int kexec_should_crash(struct task_struct *p) { return 0; }
#endif /* CONFIG_KEXEC */


-
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/