aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 20:29:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 20:29:53 -0400
commit492f59f526d95e73028f57bff475b4bbe3c8cb72 (patch)
tree8419a65de08183e350a468433fb3f4205e49ae80 /kernel
parentf945b7abcb6cfd3106c9855aa2aa6e4396a19d76 (diff)
parent7bee946358c3cb957d4aa648fc5ab3cad0b232d0 (diff)
Merge branch 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: locking: rename trace_softirq_[enter|exit] => lockdep_softirq_[enter|exit] lockdep: remove duplicate CONFIG_DEBUG_LOCKDEP definitions lockdep: require framepointers for x86 lockdep: remove extra "irq" string lockdep: fix incorrect state name
Diffstat (limited to 'kernel')
-rw-r--r--kernel/lockdep.c16
-rw-r--r--kernel/softirq.c4
2 files changed, 7 insertions, 13 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 3673a3f44d9d..981cd4854281 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -433,13 +433,6 @@ atomic_t nr_find_usage_forwards_checks;
433atomic_t nr_find_usage_forwards_recursions; 433atomic_t nr_find_usage_forwards_recursions;
434atomic_t nr_find_usage_backwards_checks; 434atomic_t nr_find_usage_backwards_checks;
435atomic_t nr_find_usage_backwards_recursions; 435atomic_t nr_find_usage_backwards_recursions;
436# define debug_atomic_inc(ptr) atomic_inc(ptr)
437# define debug_atomic_dec(ptr) atomic_dec(ptr)
438# define debug_atomic_read(ptr) atomic_read(ptr)
439#else
440# define debug_atomic_inc(ptr) do { } while (0)
441# define debug_atomic_dec(ptr) do { } while (0)
442# define debug_atomic_read(ptr) 0
443#endif 436#endif
444 437
445/* 438/*
@@ -1900,9 +1893,9 @@ print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other,
1900 curr->comm, task_pid_nr(curr)); 1893 curr->comm, task_pid_nr(curr));
1901 print_lock(this); 1894 print_lock(this);
1902 if (forwards) 1895 if (forwards)
1903 printk("but this lock took another, %s-irq-unsafe lock in the past:\n", irqclass); 1896 printk("but this lock took another, %s-unsafe lock in the past:\n", irqclass);
1904 else 1897 else
1905 printk("but this lock was taken by another, %s-irq-safe lock in the past:\n", irqclass); 1898 printk("but this lock was taken by another, %s-safe lock in the past:\n", irqclass);
1906 print_lock_name(other); 1899 print_lock_name(other);
1907 printk("\n\nand interrupts could create inverse lock ordering between them.\n\n"); 1900 printk("\n\nand interrupts could create inverse lock ordering between them.\n\n");
1908 1901
@@ -2015,7 +2008,8 @@ typedef int (*check_usage_f)(struct task_struct *, struct held_lock *,
2015 enum lock_usage_bit bit, const char *name); 2008 enum lock_usage_bit bit, const char *name);
2016 2009
2017static int 2010static int
2018mark_lock_irq(struct task_struct *curr, struct held_lock *this, int new_bit) 2011mark_lock_irq(struct task_struct *curr, struct held_lock *this,
2012 enum lock_usage_bit new_bit)
2019{ 2013{
2020 int excl_bit = exclusive_bit(new_bit); 2014 int excl_bit = exclusive_bit(new_bit);
2021 int read = new_bit & 1; 2015 int read = new_bit & 1;
@@ -2043,7 +2037,7 @@ mark_lock_irq(struct task_struct *curr, struct held_lock *this, int new_bit)
2043 * states. 2037 * states.
2044 */ 2038 */
2045 if ((!read || !dir || STRICT_READ_CHECKS) && 2039 if ((!read || !dir || STRICT_READ_CHECKS) &&
2046 !usage(curr, this, excl_bit, state_name(new_bit))) 2040 !usage(curr, this, excl_bit, state_name(new_bit & ~1)))
2047 return 0; 2041 return 0;
2048 2042
2049 /* 2043 /*
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 57d3f67f6f38..487751604300 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -180,7 +180,7 @@ asmlinkage void __do_softirq(void)
180 account_system_vtime(current); 180 account_system_vtime(current);
181 181
182 __local_bh_disable((unsigned long)__builtin_return_address(0)); 182 __local_bh_disable((unsigned long)__builtin_return_address(0));
183 trace_softirq_enter(); 183 lockdep_softirq_enter();
184 184
185 cpu = smp_processor_id(); 185 cpu = smp_processor_id();
186restart: 186restart:
@@ -220,7 +220,7 @@ restart:
220 if (pending) 220 if (pending)
221 wakeup_softirqd(); 221 wakeup_softirqd();
222 222
223 trace_softirq_exit(); 223 lockdep_softirq_exit();
224 224
225 account_system_vtime(current); 225 account_system_vtime(current);
226 _local_bh_enable(); 226 _local_bh_enable();