Commit ab531878 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core debug changes from Ingo Molnar:
 "This contains mostly kernel debugging related updates:

   - make hung_task detection more configurable to distros
   - add final bits for x86 UV NMI debugging, with related KGDB changes
   - update the mailing-list of MAINTAINERS entries I'm involved with"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hung_task: Display every hung task warning
  sysctl: Add neg_one as a standard constraint
  x86/uv/nmi, kgdb/kdb: Fix UV NMI handler when KDB not configured
  x86/uv/nmi: Fix Sparse warnings
  kgdb/kdb: Fix no KDB config problem
  MAINTAINERS: Restore "L: linux-kernel@vger.kernel.org" entries
parents 14164b46 270750db
...@@ -33,6 +33,10 @@ show up in /proc/sys/kernel: ...@@ -33,6 +33,10 @@ show up in /proc/sys/kernel:
- domainname - domainname
- hostname - hostname
- hotplug - hotplug
- hung_task_panic
- hung_task_check_count
- hung_task_timeout_secs
- hung_task_warnings
- kexec_load_disabled - kexec_load_disabled
- kptr_restrict - kptr_restrict
- kstack_depth_to_print [ X86 only ] - kstack_depth_to_print [ X86 only ]
...@@ -288,6 +292,44 @@ Default value is "/sbin/hotplug". ...@@ -288,6 +292,44 @@ Default value is "/sbin/hotplug".
============================================================== ==============================================================
hung_task_panic:
Controls the kernel's behavior when a hung task is detected.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: continue operation. This is the default behavior.
1: panic immediately.
==============================================================
hung_task_check_count:
The upper bound on the number of tasks that are checked.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
==============================================================
hung_task_timeout_secs:
Check interval. When a task in D state did not get scheduled
for more than this value report a warning.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
0: means infinite timeout - no checking done.
==============================================================
hung_task_warning:
The maximum number of warnings to report. During a check interval
When this value is reached, no more the warnings will be reported.
This file shows up if CONFIG_DETECT_HUNG_TASK is enabled.
-1: report an infinite number of warnings.
==============================================================
kexec_load_disabled: kexec_load_disabled:
A toggle indicating if the kexec_load syscall has been disabled. This A toggle indicating if the kexec_load syscall has been disabled. This
......
...@@ -2222,6 +2222,7 @@ F: include/linux/clk.h ...@@ -2222,6 +2222,7 @@ F: include/linux/clk.h
CLOCKSOURCE, CLOCKEVENT DRIVERS CLOCKSOURCE, CLOCKEVENT DRIVERS
M: Daniel Lezcano <daniel.lezcano@linaro.org> M: Daniel Lezcano <daniel.lezcano@linaro.org>
M: Thomas Gleixner <tglx@linutronix.de> M: Thomas Gleixner <tglx@linutronix.de>
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
S: Supported S: Supported
F: drivers/clocksource F: drivers/clocksource
...@@ -4023,6 +4024,7 @@ F: include/uapi/linux/hid* ...@@ -4023,6 +4024,7 @@ F: include/uapi/linux/hid*
HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS
M: Thomas Gleixner <tglx@linutronix.de> M: Thomas Gleixner <tglx@linutronix.de>
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
S: Maintained S: Maintained
F: Documentation/timers/ F: Documentation/timers/
...@@ -4694,6 +4696,7 @@ F: net/irda/ ...@@ -4694,6 +4696,7 @@ F: net/irda/
IRQ SUBSYSTEM IRQ SUBSYSTEM
M: Thomas Gleixner <tglx@linutronix.de> M: Thomas Gleixner <tglx@linutronix.de>
L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
F: kernel/irq/ F: kernel/irq/
...@@ -5325,6 +5328,7 @@ F: drivers/media/usb/dvb-usb-v2/lmedm04* ...@@ -5325,6 +5328,7 @@ F: drivers/media/usb/dvb-usb-v2/lmedm04*
LOCKDEP AND LOCKSTAT LOCKDEP AND LOCKSTAT
M: Peter Zijlstra <peterz@infradead.org> M: Peter Zijlstra <peterz@infradead.org>
M: Ingo Molnar <mingo@redhat.com> M: Ingo Molnar <mingo@redhat.com>
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/locking T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/locking
S: Maintained S: Maintained
F: Documentation/lockdep*.txt F: Documentation/lockdep*.txt
...@@ -6622,6 +6626,7 @@ M: Peter Zijlstra <a.p.zijlstra@chello.nl> ...@@ -6622,6 +6626,7 @@ M: Peter Zijlstra <a.p.zijlstra@chello.nl>
M: Paul Mackerras <paulus@samba.org> M: Paul Mackerras <paulus@samba.org>
M: Ingo Molnar <mingo@redhat.com> M: Ingo Molnar <mingo@redhat.com>
M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
S: Supported S: Supported
F: kernel/events/* F: kernel/events/*
...@@ -6745,6 +6750,7 @@ F: drivers/scsi/pm8001/ ...@@ -6745,6 +6750,7 @@ F: drivers/scsi/pm8001/
POSIX CLOCKS and TIMERS POSIX CLOCKS and TIMERS
M: Thomas Gleixner <tglx@linutronix.de> M: Thomas Gleixner <tglx@linutronix.de>
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
S: Supported S: Supported
F: fs/timerfd.c F: fs/timerfd.c
...@@ -7153,6 +7159,7 @@ F: drivers/net/wireless/ray* ...@@ -7153,6 +7159,7 @@ F: drivers/net/wireless/ray*
RCUTORTURE MODULE RCUTORTURE MODULE
M: Josh Triplett <josh@freedesktop.org> M: Josh Triplett <josh@freedesktop.org>
M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
L: linux-kernel@vger.kernel.org
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
F: Documentation/RCU/torture.txt F: Documentation/RCU/torture.txt
...@@ -7160,6 +7167,7 @@ F: kernel/rcu/torture.c ...@@ -7160,6 +7167,7 @@ F: kernel/rcu/torture.c
RCUTORTURE TEST FRAMEWORK RCUTORTURE TEST FRAMEWORK
M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
L: linux-kernel@vger.kernel.org
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
F: tools/testing/selftests/rcutorture F: tools/testing/selftests/rcutorture
...@@ -7183,6 +7191,7 @@ F: net/rds/ ...@@ -7183,6 +7191,7 @@ F: net/rds/
READ-COPY UPDATE (RCU) READ-COPY UPDATE (RCU)
M: Dipankar Sarma <dipankar@in.ibm.com> M: Dipankar Sarma <dipankar@in.ibm.com>
M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
L: linux-kernel@vger.kernel.org
W: http://www.rdrop.com/users/paulmck/RCU/ W: http://www.rdrop.com/users/paulmck/RCU/
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
...@@ -7492,6 +7501,7 @@ F: drivers/mmc/host/dw_mmc* ...@@ -7492,6 +7501,7 @@ F: drivers/mmc/host/dw_mmc*
TIMEKEEPING, CLOCKSOURCE CORE, NTP TIMEKEEPING, CLOCKSOURCE CORE, NTP
M: John Stultz <john.stultz@linaro.org> M: John Stultz <john.stultz@linaro.org>
M: Thomas Gleixner <tglx@linutronix.de> M: Thomas Gleixner <tglx@linutronix.de>
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
S: Supported S: Supported
F: include/linux/clocksource.h F: include/linux/clocksource.h
...@@ -7517,6 +7527,7 @@ F: drivers/watchdog/sc1200wdt.c ...@@ -7517,6 +7527,7 @@ F: drivers/watchdog/sc1200wdt.c
SCHEDULER SCHEDULER
M: Ingo Molnar <mingo@redhat.com> M: Ingo Molnar <mingo@redhat.com>
M: Peter Zijlstra <peterz@infradead.org> M: Peter Zijlstra <peterz@infradead.org>
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
S: Maintained S: Maintained
F: kernel/sched/ F: kernel/sched/
...@@ -7884,6 +7895,7 @@ F: mm/sl?b.c ...@@ -7884,6 +7895,7 @@ F: mm/sl?b.c
SLEEPABLE READ-COPY UPDATE (SRCU) SLEEPABLE READ-COPY UPDATE (SRCU)
M: Lai Jiangshan <laijs@cn.fujitsu.com> M: Lai Jiangshan <laijs@cn.fujitsu.com>
M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
L: linux-kernel@vger.kernel.org
W: http://www.rdrop.com/users/paulmck/RCU/ W: http://www.rdrop.com/users/paulmck/RCU/
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
...@@ -9587,6 +9599,7 @@ M: Thomas Gleixner <tglx@linutronix.de> ...@@ -9587,6 +9599,7 @@ M: Thomas Gleixner <tglx@linutronix.de>
M: Ingo Molnar <mingo@redhat.com> M: Ingo Molnar <mingo@redhat.com>
M: "H. Peter Anvin" <hpa@zytor.com> M: "H. Peter Anvin" <hpa@zytor.com>
M: x86@kernel.org M: x86@kernel.org
L: linux-kernel@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
S: Maintained S: Maintained
F: Documentation/x86/ F: Documentation/x86/
......
...@@ -12,7 +12,6 @@ extern enum uv_system_type get_uv_system_type(void); ...@@ -12,7 +12,6 @@ extern enum uv_system_type get_uv_system_type(void);
extern int is_uv_system(void); extern int is_uv_system(void);
extern void uv_cpu_init(void); extern void uv_cpu_init(void);
extern void uv_nmi_init(void); extern void uv_nmi_init(void);
extern void uv_register_nmi_notifier(void);
extern void uv_system_init(void); extern void uv_system_init(void);
extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
struct mm_struct *mm, struct mm_struct *mm,
...@@ -26,7 +25,6 @@ static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; } ...@@ -26,7 +25,6 @@ static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
static inline int is_uv_system(void) { return 0; } static inline int is_uv_system(void) { return 0; }
static inline void uv_cpu_init(void) { } static inline void uv_cpu_init(void) { }
static inline void uv_system_init(void) { } static inline void uv_system_init(void) { }
static inline void uv_register_nmi_notifier(void) { }
static inline const struct cpumask * static inline const struct cpumask *
uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm, uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm,
unsigned long start, unsigned long end, unsigned int cpu) unsigned long start, unsigned long end, unsigned int cpu)
......
...@@ -980,7 +980,6 @@ void __init uv_system_init(void) ...@@ -980,7 +980,6 @@ void __init uv_system_init(void)
uv_nmi_setup(); uv_nmi_setup();
uv_cpu_init(); uv_cpu_init();
uv_scir_register_cpu_notifier(); uv_scir_register_cpu_notifier();
uv_register_nmi_notifier();
proc_mkdir("sgi_uv", NULL); proc_mkdir("sgi_uv", NULL);
/* register Legacy VGA I/O redirection handler */ /* register Legacy VGA I/O redirection handler */
......
...@@ -74,7 +74,6 @@ static atomic_t uv_in_nmi; ...@@ -74,7 +74,6 @@ static atomic_t uv_in_nmi;
static atomic_t uv_nmi_cpu = ATOMIC_INIT(-1); static atomic_t uv_nmi_cpu = ATOMIC_INIT(-1);
static atomic_t uv_nmi_cpus_in_nmi = ATOMIC_INIT(-1); static atomic_t uv_nmi_cpus_in_nmi = ATOMIC_INIT(-1);
static atomic_t uv_nmi_slave_continue; static atomic_t uv_nmi_slave_continue;
static atomic_t uv_nmi_kexec_failed;
static cpumask_var_t uv_nmi_cpu_mask; static cpumask_var_t uv_nmi_cpu_mask;
/* Values for uv_nmi_slave_continue */ /* Values for uv_nmi_slave_continue */
...@@ -149,7 +148,8 @@ module_param_named(retry_count, uv_nmi_retry_count, int, 0644); ...@@ -149,7 +148,8 @@ module_param_named(retry_count, uv_nmi_retry_count, int, 0644);
* "dump" - dump process stack for each cpu * "dump" - dump process stack for each cpu
* "ips" - dump IP info for each cpu * "ips" - dump IP info for each cpu
* "kdump" - do crash dump * "kdump" - do crash dump
* "kdb" - enter KDB/KGDB (default) * "kdb" - enter KDB (default)
* "kgdb" - enter KGDB
*/ */
static char uv_nmi_action[8] = "kdb"; static char uv_nmi_action[8] = "kdb";
module_param_string(action, uv_nmi_action, sizeof(uv_nmi_action), 0644); module_param_string(action, uv_nmi_action, sizeof(uv_nmi_action), 0644);
...@@ -504,6 +504,7 @@ static void uv_nmi_touch_watchdogs(void) ...@@ -504,6 +504,7 @@ static void uv_nmi_touch_watchdogs(void)
} }
#if defined(CONFIG_KEXEC) #if defined(CONFIG_KEXEC)
static atomic_t uv_nmi_kexec_failed;
static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs) static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
{ {
/* Call crash to dump system state */ /* Call crash to dump system state */
...@@ -537,18 +538,45 @@ static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs) ...@@ -537,18 +538,45 @@ static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
} }
#endif /* !CONFIG_KEXEC */ #endif /* !CONFIG_KEXEC */
#ifdef CONFIG_KGDB
#ifdef CONFIG_KGDB_KDB #ifdef CONFIG_KGDB_KDB
/* Call KDB from NMI handler */ static inline int uv_nmi_kdb_reason(void)
static void uv_call_kdb(int cpu, struct pt_regs *regs, int master)
{ {
int ret; return KDB_REASON_SYSTEM_NMI;
}
#else /* !CONFIG_KGDB_KDB */
static inline int uv_nmi_kdb_reason(void)
{
/* Insure user is expecting to attach gdb remote */
if (uv_nmi_action_is("kgdb"))
return 0;
pr_err("UV: NMI error: KDB is not enabled in this kernel\n");
return -1;
}
#endif /* CONFIG_KGDB_KDB */
/*
* Call KGDB/KDB from NMI handler
*
* Note that if both KGDB and KDB are configured, then the action of 'kgdb' or
* 'kdb' has no affect on which is used. See the KGDB documention for further
* information.
*/
static void uv_call_kgdb_kdb(int cpu, struct pt_regs *regs, int master)
{
if (master) { if (master) {
int reason = uv_nmi_kdb_reason();
int ret;
if (reason < 0)
return;
/* call KGDB NMI handler as MASTER */ /* call KGDB NMI handler as MASTER */
ret = kgdb_nmicallin(cpu, X86_TRAP_NMI, regs, ret = kgdb_nmicallin(cpu, X86_TRAP_NMI, regs, reason,
&uv_nmi_slave_continue); &uv_nmi_slave_continue);
if (ret) { if (ret) {
pr_alert("KDB returned error, is kgdboc set?\n"); pr_alert("KGDB returned error, is kgdboc set?\n");
atomic_set(&uv_nmi_slave_continue, SLAVE_EXIT); atomic_set(&uv_nmi_slave_continue, SLAVE_EXIT);
} }
} else { } else {
...@@ -567,12 +595,12 @@ static void uv_call_kdb(int cpu, struct pt_regs *regs, int master) ...@@ -567,12 +595,12 @@ static void uv_call_kdb(int cpu, struct pt_regs *regs, int master)
uv_nmi_sync_exit(master); uv_nmi_sync_exit(master);
} }
#else /* !CONFIG_KGDB_KDB */ #else /* !CONFIG_KGDB */
static inline void uv_call_kdb(int cpu, struct pt_regs *regs, int master) static inline void uv_call_kgdb_kdb(int cpu, struct pt_regs *regs, int master)
{ {
pr_err("UV: NMI error: KGDB/KDB is not enabled in this kernel\n"); pr_err("UV: NMI error: KGDB is not enabled in this kernel\n");
} }
#endif /* !CONFIG_KGDB_KDB */ #endif /* !CONFIG_KGDB */
/* /*
* UV NMI handler * UV NMI handler
...@@ -606,9 +634,9 @@ int uv_handle_nmi(unsigned int reason, struct pt_regs *regs) ...@@ -606,9 +634,9 @@ int uv_handle_nmi(unsigned int reason, struct pt_regs *regs)
if (uv_nmi_action_is("ips") || uv_nmi_action_is("dump")) if (uv_nmi_action_is("ips") || uv_nmi_action_is("dump"))
uv_nmi_dump_state(cpu, regs, master); uv_nmi_dump_state(cpu, regs, master);
/* Call KDB if enabled */ /* Call KGDB/KDB if enabled */
else if (uv_nmi_action_is("kdb")) else if (uv_nmi_action_is("kdb") || uv_nmi_action_is("kgdb"))
uv_call_kdb(cpu, regs, master); uv_call_kgdb_kdb(cpu, regs, master);
/* Clear per_cpu "in nmi" flag */ /* Clear per_cpu "in nmi" flag */
atomic_set(&uv_cpu_nmi.state, UV_NMI_STATE_OUT); atomic_set(&uv_cpu_nmi.state, UV_NMI_STATE_OUT);
...@@ -634,7 +662,7 @@ int uv_handle_nmi(unsigned int reason, struct pt_regs *regs) ...@@ -634,7 +662,7 @@ int uv_handle_nmi(unsigned int reason, struct pt_regs *regs)
/* /*
* NMI handler for pulling in CPUs when perf events are grabbing our NMI * NMI handler for pulling in CPUs when perf events are grabbing our NMI
*/ */
int uv_handle_nmi_ping(unsigned int reason, struct pt_regs *regs) static int uv_handle_nmi_ping(unsigned int reason, struct pt_regs *regs)
{ {
int ret; int ret;
...@@ -651,7 +679,7 @@ int uv_handle_nmi_ping(unsigned int reason, struct pt_regs *regs) ...@@ -651,7 +679,7 @@ int uv_handle_nmi_ping(unsigned int reason, struct pt_regs *regs)
return ret; return ret;
} }
void uv_register_nmi_notifier(void) static void uv_register_nmi_notifier(void)
{ {
if (register_nmi_handler(NMI_UNKNOWN, uv_handle_nmi, 0, "uv")) if (register_nmi_handler(NMI_UNKNOWN, uv_handle_nmi, 0, "uv"))
pr_warn("UV: NMI handler failed to register\n"); pr_warn("UV: NMI handler failed to register\n");
...@@ -695,6 +723,5 @@ void uv_nmi_setup(void) ...@@ -695,6 +723,5 @@ void uv_nmi_setup(void)
uv_hub_nmi_per(cpu) = uv_hub_nmi_list[nid]; uv_hub_nmi_per(cpu) = uv_hub_nmi_list[nid];
} }
BUG_ON(!alloc_cpumask_var(&uv_nmi_cpu_mask, GFP_KERNEL)); BUG_ON(!alloc_cpumask_var(&uv_nmi_cpu_mask, GFP_KERNEL));
uv_register_nmi_notifier();
} }
...@@ -310,7 +310,8 @@ extern int ...@@ -310,7 +310,8 @@ extern int
kgdb_handle_exception(int ex_vector, int signo, int err_code, kgdb_handle_exception(int ex_vector, int signo, int err_code,
struct pt_regs *regs); struct pt_regs *regs);
extern int kgdb_nmicallback(int cpu, void *regs); extern int kgdb_nmicallback(int cpu, void *regs);
extern int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *snd_rdy); extern int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code,
atomic_t *snd_rdy);
extern void gdbstub_exit(int status); extern void gdbstub_exit(int status);
extern int kgdb_single_step; extern int kgdb_single_step;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
extern int sysctl_hung_task_check_count; extern int sysctl_hung_task_check_count;
extern unsigned int sysctl_hung_task_panic; extern unsigned int sysctl_hung_task_panic;
extern unsigned long sysctl_hung_task_timeout_secs; extern unsigned long sysctl_hung_task_timeout_secs;
extern unsigned long sysctl_hung_task_warnings; extern int sysctl_hung_task_warnings;
extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
void __user *buffer, void __user *buffer,
size_t *lenp, loff_t *ppos); size_t *lenp, loff_t *ppos);
......
...@@ -736,7 +736,8 @@ int kgdb_nmicallback(int cpu, void *regs) ...@@ -736,7 +736,8 @@ int kgdb_nmicallback(int cpu, void *regs)
return 1; return 1;
} }
int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready) int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code,
atomic_t *send_ready)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (!kgdb_io_ready(0) || !send_ready) if (!kgdb_io_ready(0) || !send_ready)
...@@ -750,7 +751,7 @@ int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready) ...@@ -750,7 +751,7 @@ int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready)
ks->cpu = cpu; ks->cpu = cpu;
ks->ex_vector = trapnr; ks->ex_vector = trapnr;
ks->signo = SIGTRAP; ks->signo = SIGTRAP;
ks->err_code = KGDB_KDB_REASON_SYSTEM_NMI; ks->err_code = err_code;
ks->linux_regs = regs; ks->linux_regs = regs;
ks->send_ready = send_ready; ks->send_ready = send_ready;
kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER);
......
...@@ -75,13 +75,11 @@ extern int kdb_stub(struct kgdb_state *ks); ...@@ -75,13 +75,11 @@ extern int kdb_stub(struct kgdb_state *ks);
extern int kdb_parse(const char *cmdstr); extern int kdb_parse(const char *cmdstr);
extern int kdb_common_init_state(struct kgdb_state *ks); extern int kdb_common_init_state(struct kgdb_state *ks);
extern int kdb_common_deinit_state(void); extern int kdb_common_deinit_state(void);
#define KGDB_KDB_REASON_SYSTEM_NMI KDB_REASON_SYSTEM_NMI
#else /* ! CONFIG_KGDB_KDB */ #else /* ! CONFIG_KGDB_KDB */
static inline int kdb_stub(struct kgdb_state *ks) static inline int kdb_stub(struct kgdb_state *ks)
{ {
return DBG_PASS_EVENT; return DBG_PASS_EVENT;
} }
#define KGDB_KDB_REASON_SYSTEM_NMI 0
#endif /* CONFIG_KGDB_KDB */ #endif /* CONFIG_KGDB_KDB */
#endif /* _DEBUG_CORE_H_ */ #endif /* _DEBUG_CORE_H_ */
...@@ -37,7 +37,7 @@ int __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT; ...@@ -37,7 +37,7 @@ int __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
*/ */
unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT; unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT;
unsigned long __read_mostly sysctl_hung_task_warnings = 10; int __read_mostly sysctl_hung_task_warnings = 10;
static int __read_mostly did_panic; static int __read_mostly did_panic;
...@@ -98,7 +98,9 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) ...@@ -98,7 +98,9 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
if (!sysctl_hung_task_warnings) if (!sysctl_hung_task_warnings)
return; return;
sysctl_hung_task_warnings--;
if (sysctl_hung_task_warnings > 0)
sysctl_hung_task_warnings--;
/* /*
* Ok, the task did not get scheduled for more than 2 minutes, * Ok, the task did not get scheduled for more than 2 minutes,
......
...@@ -121,6 +121,8 @@ extern int blk_iopoll_enabled; ...@@ -121,6 +121,8 @@ extern int blk_iopoll_enabled;
static int sixty = 60; static int sixty = 60;
#endif #endif
static int __maybe_unused neg_one = -1;
static int zero; static int zero;
static int __maybe_unused one = 1; static int __maybe_unused one = 1;
static int __maybe_unused two = 2; static int __maybe_unused two = 2;
...@@ -997,9 +999,10 @@ static struct ctl_table kern_table[] = { ...@@ -997,9 +999,10 @@ static struct ctl_table kern_table[] = {
{ {
.procname = "hung_task_warnings", .procname = "hung_task_warnings",
.data = &sysctl_hung_task_warnings, .data = &sysctl_hung_task_warnings,
.maxlen = sizeof(unsigned long), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = proc_doulongvec_minmax, .proc_handler = proc_dointvec_minmax,
.extra1 = &neg_one,
}, },
#endif #endif
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment