mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
Merge branch 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core debug changes from Ingo Molnar: "Currently there are two methods to set the panic_timeout: via 'panic=X' boot commandline option, or via /proc/sys/kernel/panic. This tree adds a third panic_timeout configuration method: configuration via Kconfig, via CONFIG_PANIC_TIMEOUT=X - useful to distros that generally want their kernel defaults to come with the .config. CONFIG_PANIC_TIMEOUT defaults to 0, which was the previous default value of panic_timeout. Doing that unearthed a few arch trickeries regarding arch-special panic_timeout values and related complications - hopefully all resolved to the satisfaction of everyone" * 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: powerpc: Clean up panic_timeout usage MIPS: Remove panic_timeout settings panic: Make panic_timeout configurable
This commit is contained in:
commit
897aea303f
@ -92,7 +92,6 @@ void __init plat_mem_setup(void)
|
||||
_machine_restart = ar7_machine_restart;
|
||||
_machine_halt = ar7_machine_halt;
|
||||
pm_power_off = ar7_machine_power_off;
|
||||
panic_timeout = 3;
|
||||
|
||||
io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000);
|
||||
if (!io_base)
|
||||
|
@ -111,9 +111,6 @@ void __init plat_mem_setup(void)
|
||||
iomem_resource.start = EMMA2RH_IO_BASE;
|
||||
iomem_resource.end = EMMA2RH_ROM_BASE - 1;
|
||||
|
||||
/* Reboot on panic */
|
||||
panic_timeout = 180;
|
||||
|
||||
markeins_sio_setup();
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,6 @@ static void __init xlp_init_mem_from_bars(void)
|
||||
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
panic_timeout = 5;
|
||||
_machine_restart = (void (*)(char *))nlm_linux_exit;
|
||||
_machine_halt = nlm_linux_exit;
|
||||
pm_power_off = nlm_linux_exit;
|
||||
|
@ -92,7 +92,6 @@ static void nlm_linux_exit(void)
|
||||
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
panic_timeout = 5;
|
||||
_machine_restart = (void (*)(char *))nlm_linux_exit;
|
||||
_machine_halt = nlm_linux_exit;
|
||||
pm_power_off = nlm_linux_exit;
|
||||
|
@ -134,8 +134,6 @@ void __init plat_mem_setup(void)
|
||||
#error invalid SiByte board configuration
|
||||
#endif
|
||||
|
||||
panic_timeout = 5; /* For debug. */
|
||||
|
||||
board_be_handler = swarm_be_handler;
|
||||
|
||||
if (xicor_probe())
|
||||
|
@ -147,6 +147,10 @@ config EARLY_PRINTK
|
||||
bool
|
||||
default y
|
||||
|
||||
config PANIC_TIMEOUT
|
||||
int
|
||||
default 180
|
||||
|
||||
config COMPAT
|
||||
bool
|
||||
default y if PPC64
|
||||
|
@ -26,6 +26,7 @@ extern void reloc_got2(unsigned long);
|
||||
void check_for_initrd(void);
|
||||
void do_init_bootmem(void);
|
||||
void setup_panic(void);
|
||||
#define ARCH_PANIC_TIMEOUT 180
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
|
@ -296,9 +296,6 @@ void __init setup_arch(char **cmdline_p)
|
||||
if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
|
||||
ucache_bsize = icache_bsize = dcache_bsize;
|
||||
|
||||
/* reboot on panic */
|
||||
panic_timeout = 180;
|
||||
|
||||
if (ppc_md.panic)
|
||||
setup_panic();
|
||||
|
||||
|
@ -588,9 +588,6 @@ void __init setup_arch(char **cmdline_p)
|
||||
dcache_bsize = ppc64_caches.dline_size;
|
||||
icache_bsize = ppc64_caches.iline_size;
|
||||
|
||||
/* reboot on panic */
|
||||
panic_timeout = 180;
|
||||
|
||||
if (ppc_md.panic)
|
||||
setup_panic();
|
||||
|
||||
|
@ -470,7 +470,7 @@ static long pseries_little_endian_exceptions(void)
|
||||
|
||||
static void __init pSeries_setup_arch(void)
|
||||
{
|
||||
panic_timeout = 10;
|
||||
set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
|
||||
|
||||
/* Discover PIC type and setup ppc_md accordingly */
|
||||
pseries_discover_pic();
|
||||
|
@ -394,6 +394,15 @@ extern int panic_on_oops;
|
||||
extern int panic_on_unrecovered_nmi;
|
||||
extern int panic_on_io_nmi;
|
||||
extern int sysctl_panic_on_stackoverflow;
|
||||
/*
|
||||
* Only to be used by arch init code. If the user over-wrote the default
|
||||
* CONFIG_PANIC_TIMEOUT, honor it.
|
||||
*/
|
||||
static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout)
|
||||
{
|
||||
if (panic_timeout == arch_default_timeout)
|
||||
panic_timeout = timeout;
|
||||
}
|
||||
extern const char *print_tainted(void);
|
||||
enum lockdep_ok {
|
||||
LOCKDEP_STILL_OK,
|
||||
|
@ -33,7 +33,7 @@ static int pause_on_oops;
|
||||
static int pause_on_oops_flag;
|
||||
static DEFINE_SPINLOCK(pause_on_oops_lock);
|
||||
|
||||
int panic_timeout;
|
||||
int panic_timeout = CONFIG_PANIC_TIMEOUT;
|
||||
EXPORT_SYMBOL_GPL(panic_timeout);
|
||||
|
||||
ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
|
||||
|
@ -761,6 +761,15 @@ config PANIC_ON_OOPS_VALUE
|
||||
default 0 if !PANIC_ON_OOPS
|
||||
default 1 if PANIC_ON_OOPS
|
||||
|
||||
config PANIC_TIMEOUT
|
||||
int "panic timeout"
|
||||
default 0
|
||||
help
|
||||
Set the timeout value (in seconds) until a reboot occurs when the
|
||||
the kernel panics. If n = 0, then we wait forever. A timeout
|
||||
value n > 0 will wait n seconds before rebooting, while a timeout
|
||||
value n < 0 will reboot immediately.
|
||||
|
||||
config SCHED_DEBUG
|
||||
bool "Collect scheduler debugging info"
|
||||
depends on DEBUG_KERNEL && PROC_FS
|
||||
|
Loading…
Reference in New Issue
Block a user