diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-01-25 03:16:14 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-25 03:16:14 -0500 |
commit | 2b45e0f9f34f718725e093f4e335600811d7105a (patch) | |
tree | 3c6d594539eb16fc955906da65b9fa7aacbc9145 /lib | |
parent | a85eba8814631d0d48361c8b9a7ee0984e80c03c (diff) | |
parent | 15c81026204da897a05424c79263aea861a782cc (diff) |
Merge branch 'linus' into x86/urgent
Merge in the x86 changes to apply a fix.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 9 | ||||
-rw-r--r-- | lib/percpu_counter.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index db25707aa41b..6982094a7e74 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -761,6 +761,15 @@ config PANIC_ON_OOPS_VALUE | |||
761 | default 0 if !PANIC_ON_OOPS | 761 | default 0 if !PANIC_ON_OOPS |
762 | default 1 if PANIC_ON_OOPS | 762 | default 1 if PANIC_ON_OOPS |
763 | 763 | ||
764 | config PANIC_TIMEOUT | ||
765 | int "panic timeout" | ||
766 | default 0 | ||
767 | help | ||
768 | Set the timeout value (in seconds) until a reboot occurs when the | ||
769 | the kernel panics. If n = 0, then we wait forever. A timeout | ||
770 | value n > 0 will wait n seconds before rebooting, while a timeout | ||
771 | value n < 0 will reboot immediately. | ||
772 | |||
764 | config SCHED_DEBUG | 773 | config SCHED_DEBUG |
765 | bool "Collect scheduler debugging info" | 774 | bool "Collect scheduler debugging info" |
766 | depends on DEBUG_KERNEL && PROC_FS | 775 | depends on DEBUG_KERNEL && PROC_FS |
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c index 7473ee3b4ee7..8280a5dd1727 100644 --- a/lib/percpu_counter.c +++ b/lib/percpu_counter.c | |||
@@ -82,10 +82,10 @@ void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch) | |||
82 | unsigned long flags; | 82 | unsigned long flags; |
83 | raw_spin_lock_irqsave(&fbc->lock, flags); | 83 | raw_spin_lock_irqsave(&fbc->lock, flags); |
84 | fbc->count += count; | 84 | fbc->count += count; |
85 | __this_cpu_sub(*fbc->counters, count - amount); | ||
85 | raw_spin_unlock_irqrestore(&fbc->lock, flags); | 86 | raw_spin_unlock_irqrestore(&fbc->lock, flags); |
86 | __this_cpu_write(*fbc->counters, 0); | ||
87 | } else { | 87 | } else { |
88 | __this_cpu_write(*fbc->counters, count); | 88 | this_cpu_add(*fbc->counters, amount); |
89 | } | 89 | } |
90 | preempt_enable(); | 90 | preempt_enable(); |
91 | } | 91 | } |