
From: "Randy.Dunlap" <rddunlap@osdl.org>

Move 'panic_timeout' to linux/kernel.h.

ipmi_watchdog.c wanted to know why panic_timeout isn't in some header file.
 However, ipmi_watchdog.c doesn't even use it, so that reference was
deleted.  Other references now use kernel.h instead of straight extern int.

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/mips/ddb5xxx/ddb5074/setup.c   |    2 --
 25-akpm/arch/mips/ddb5xxx/ddb5476/setup.c   |    2 --
 25-akpm/arch/mips/ddb5xxx/ddb5477/setup.c   |    2 --
 25-akpm/arch/mips/jmr3927/rbhma3100/setup.c |    1 -
 25-akpm/arch/mips/sibyte/swarm/setup.c      |    3 +--
 25-akpm/arch/ppc/kernel/setup.c             |    2 +-
 25-akpm/arch/ppc64/kernel/iSeries_pci.c     |    2 --
 25-akpm/arch/ppc64/kernel/setup.c           |    2 +-
 25-akpm/arch/v850/kernel/fpga85e2c.c        |    1 -
 25-akpm/arch/v850/kernel/sim85e2.c          |    2 --
 25-akpm/drivers/char/ipmi/ipmi_watchdog.c   |    2 --
 25-akpm/include/linux/kernel.h              |    1 +
 25-akpm/kernel/sysctl.c                     |    1 -
 13 files changed, 4 insertions(+), 19 deletions(-)

diff -puN arch/mips/ddb5xxx/ddb5074/setup.c~panic_timeout-move-to-kernelh arch/mips/ddb5xxx/ddb5074/setup.c
--- 25/arch/mips/ddb5xxx/ddb5074/setup.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/mips/ddb5xxx/ddb5074/setup.c	Thu Dec  2 13:06:24 2004
@@ -88,8 +88,6 @@ static void __init ddb_time_init(void)
 
 static void __init ddb5074_setup(void)
 {
-	extern int panic_timeout;
-
 	set_io_port_base(NILE4_PCI_IO_BASE);
 	isa_slot_offset = NILE4_PCI_MEM_BASE;
 	board_timer_setup = ddb_timer_init;
diff -puN arch/mips/ddb5xxx/ddb5476/setup.c~panic_timeout-move-to-kernelh arch/mips/ddb5xxx/ddb5476/setup.c
--- 25/arch/mips/ddb5xxx/ddb5476/setup.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/mips/ddb5xxx/ddb5476/setup.c	Thu Dec  2 13:06:42 2004
@@ -127,8 +127,6 @@ static void ddb5476_board_init(void);
 
 static void __init ddb5476_setup(void)
 {
-	extern int panic_timeout;
-
 	set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE));
 
 	board_time_init = ddb_time_init;
diff -puN arch/mips/ddb5xxx/ddb5477/setup.c~panic_timeout-move-to-kernelh arch/mips/ddb5xxx/ddb5477/setup.c
--- 25/arch/mips/ddb5xxx/ddb5477/setup.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/mips/ddb5xxx/ddb5477/setup.c	Thu Dec  2 13:05:51 2004
@@ -172,8 +172,6 @@ extern struct pci_controller ddb5477_io_
 
 static int  ddb5477_setup(void)
 {
-	extern int panic_timeout;
-
 	/* initialize board - we don't trust the loader */
         ddb5477_board_init();
 
diff -puN arch/mips/jmr3927/rbhma3100/setup.c~panic_timeout-move-to-kernelh arch/mips/jmr3927/rbhma3100/setup.c
--- 25/arch/mips/jmr3927/rbhma3100/setup.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/mips/jmr3927/rbhma3100/setup.c	Thu Dec  2 13:05:51 2004
@@ -195,7 +195,6 @@ extern struct resource pci_mem_resource;
 
 static void __init jmr3927_setup(void)
 {
-	extern int panic_timeout;
 	char *argptr;
 
 	set_io_port_base(JMR3927_PORT_BASE + JMR3927_PCIIO);
diff -puN arch/mips/sibyte/swarm/setup.c~panic_timeout-move-to-kernelh arch/mips/sibyte/swarm/setup.c
--- 25/arch/mips/sibyte/swarm/setup.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/mips/sibyte/swarm/setup.c	Thu Dec  2 13:07:05 2004
@@ -27,6 +27,7 @@
 #include <linux/bootmem.h>
 #include <linux/blkdev.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/initrd.h>
 
@@ -85,8 +86,6 @@ int swarm_be_handler(struct pt_regs *reg
 
 static int __init swarm_setup(void)
 {
-	extern int panic_timeout;
-
 	sb1250_setup();
 
 	panic_timeout = 5;  /* For debug.  */
diff -puN arch/ppc64/kernel/iSeries_pci.c~panic_timeout-move-to-kernelh arch/ppc64/kernel/iSeries_pci.c
--- 25/arch/ppc64/kernel/iSeries_pci.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/ppc64/kernel/iSeries_pci.c	Thu Dec  2 13:05:51 2004
@@ -48,8 +48,6 @@
 
 #include "pci.h"
 
-extern int panic_timeout;
-
 extern unsigned long io_page_mask;
 
 /*
diff -puN arch/ppc64/kernel/setup.c~panic_timeout-move-to-kernelh arch/ppc64/kernel/setup.c
--- 25/arch/ppc64/kernel/setup.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/ppc64/kernel/setup.c	Thu Dec  2 13:05:51 2004
@@ -17,6 +17,7 @@
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
@@ -988,7 +989,6 @@ static void __init emergency_stack_init(
  */
 void __init setup_arch(char **cmdline_p)
 {
-	extern int panic_timeout;
 	extern void do_init_bootmem(void);
 
 	ppc64_boot_msg(0x12, "Setup Arch");
diff -puN arch/ppc/kernel/setup.c~panic_timeout-move-to-kernelh arch/ppc/kernel/setup.c
--- 25/arch/ppc/kernel/setup.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/ppc/kernel/setup.c	Thu Dec  2 13:05:51 2004
@@ -7,6 +7,7 @@
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/reboot.h>
 #include <linux/delay.h>
 #include <linux/initrd.h>
@@ -681,7 +682,6 @@ arch_initcall(ppc_init);
 /* Warning, IO base is not yet inited */
 void __init setup_arch(char **cmdline_p)
 {
-	extern int panic_timeout;
 	extern char *klimit;
 	extern void do_init_bootmem(void);
 
diff -puN arch/v850/kernel/fpga85e2c.c~panic_timeout-move-to-kernelh arch/v850/kernel/fpga85e2c.c
--- 25/arch/v850/kernel/fpga85e2c.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/v850/kernel/fpga85e2c.c	Thu Dec  2 13:05:51 2004
@@ -42,7 +42,6 @@ void __init mach_early_init (void)
 	int i;
 	const u32 *src;
 	register u32 *dst asm ("ep");
-	extern int panic_timeout;
 	extern u32 _intv_end, _intv_load_start;
 
 	/* Set bus sizes: CS0 32-bit, CS1 16-bit, CS7 8-bit,
diff -puN arch/v850/kernel/sim85e2.c~panic_timeout-move-to-kernelh arch/v850/kernel/sim85e2.c
--- 25/arch/v850/kernel/sim85e2.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/arch/v850/kernel/sim85e2.c	Thu Dec  2 13:05:51 2004
@@ -65,8 +65,6 @@ extern void memcons_setup (void);
 
 void EARLY_INIT_SECTION_ATTR mach_early_init (void)
 {
-	extern int panic_timeout;
-
 	/* The sim85e2 simulator tracks `undefined' values, so to make
 	   debugging easier, we begin by zeroing out all otherwise
 	   undefined registers.  This is not strictly necessary.
diff -puN drivers/char/ipmi/ipmi_watchdog.c~panic_timeout-move-to-kernelh drivers/char/ipmi/ipmi_watchdog.c
--- 25/drivers/char/ipmi/ipmi_watchdog.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/drivers/char/ipmi/ipmi_watchdog.c	Thu Dec  2 13:05:51 2004
@@ -876,8 +876,6 @@ static struct notifier_block wdog_reboot
 	0
 };
 
-extern int panic_timeout; /* Why isn't this defined anywhere? */
-
 static int wdog_panic_handler(struct notifier_block *this,
 			      unsigned long         event,
 			      void                  *unused)
diff -puN include/linux/kernel.h~panic_timeout-move-to-kernelh include/linux/kernel.h
--- 25/include/linux/kernel.h~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/include/linux/kernel.h	Thu Dec  2 13:05:51 2004
@@ -136,6 +136,7 @@ static inline void console_verbose(void)
 
 extern void bust_spinlocks(int yes);
 extern int oops_in_progress;		/* If set, an oops, panic(), BUG() or die() is in progress */
+extern int panic_timeout;
 extern int panic_on_oops;
 extern int tainted;
 extern const char *print_tainted(void);
diff -puN kernel/sysctl.c~panic_timeout-move-to-kernelh kernel/sysctl.c
--- 25/kernel/sysctl.c~panic_timeout-move-to-kernelh	Thu Dec  2 13:05:51 2004
+++ 25-akpm/kernel/sysctl.c	Thu Dec  2 13:05:51 2004
@@ -52,7 +52,6 @@
 #if defined(CONFIG_SYSCTL)
 
 /* External variables not in a header file. */
-extern int panic_timeout;
 extern int C_A_D;
 extern int sysctl_overcommit_memory;
 extern int sysctl_overcommit_ratio;
_
