| @@ -3484,19 +3484,21 @@ check_usage_backwards(struct task_struct *curr, struct held_lock *this, · 3483 unmodified lines |
| 3484 | 3484 | |
| 3485 | 3485 | void print_irqtrace_events(struct task_struct *curr) |
| 3486 | 3486 | { |
| 3487 | | − printk("irq event stamp: %u\n", curr->irq_events); |
| 3487 | + const struct irqtrace_events *trace = &curr->irqtrace; |
| 3488 | + |
| 3489 | + printk("irq event stamp: %u\n", trace->irq_events); |
| 3488 | 3490 | printk("hardirqs last enabled at (%u): [<%px>] %pS\n", |
| 3489 | | − curr->hardirq_enable_event, (void *)curr->hardirq_enable_ip, |
| 3490 | | − (void *)curr->hardirq_enable_ip); |
| 3491 | + trace->hardirq_enable_event, (void *)trace->hardirq_enable_ip, |
| 3492 | + (void *)trace->hardirq_enable_ip); |
| 3491 | 3493 | printk("hardirqs last disabled at (%u): [<%px>] %pS\n", |
| 3492 | | − curr->hardirq_disable_event, (void *)curr->hardirq_disable_ip, |
| 3493 | | − (void *)curr->hardirq_disable_ip); |
| 3494 | + trace->hardirq_disable_event, (void *)trace->hardirq_disable_ip, |
| 3495 | + (void *)trace->hardirq_disable_ip); |
| 3494 | 3496 | printk("softirqs last enabled at (%u): [<%px>] %pS\n", |
| 3495 | | − curr->softirq_enable_event, (void *)curr->softirq_enable_ip, |
| 3496 | | − (void *)curr->softirq_enable_ip); |
| 3497 | + trace->softirq_enable_event, (void *)trace->softirq_enable_ip, |
| 3498 | + (void *)trace->softirq_enable_ip); |
| 3497 | 3499 | printk("softirqs last disabled at (%u): [<%px>] %pS\n", |
| 3498 | | − curr->softirq_disable_event, (void *)curr->softirq_disable_ip, |
| 3499 | | − (void *)curr->softirq_disable_ip); |
| 3500 | + trace->softirq_disable_event, (void *)trace->softirq_disable_ip, |
| 3501 | + (void *)trace->softirq_disable_ip); |
| 3500 | 3502 | } |
| 3501 | 3503 | |
| 3502 | 3504 | static int HARDIRQ_verbose(struct lock_class *class) |
| @@ -3699,7 +3701,7 @@ EXPORT_SYMBOL_GPL(lockdep_hardirqs_on_prepare); · 196 unmodified lines |
| 3699 | 3701 | |
| 3700 | 3702 | void noinstr lockdep_hardirqs_on(unsigned long ip) |
| 3701 | 3703 | { |
| 3702 | | − struct task_struct *curr = current; |
| 3704 | + struct irqtrace_events *trace = ¤t->irqtrace; |
| 3703 | 3705 | |
| 3704 | 3706 | if (unlikely(!debug_locks)) |
| 3705 | 3707 | return; |
| @@ -3752,8 +3754,8 @@ void noinstr lockdep_hardirqs_on(unsigned long ip) · 46 unmodified lines |
| 3752 | 3754 | skip_checks: |
| 3753 | 3755 | /* we'll do an OFF -> ON transition: */ |
| 3754 | 3756 | this_cpu_write(hardirqs_enabled, 1); |
| 3755 | | − curr->hardirq_enable_ip = ip; |
| 3756 | | − curr->hardirq_enable_event = ++curr->irq_events; |
| 3757 | + trace->hardirq_enable_ip = ip; |
| 3758 | + trace->hardirq_enable_event = ++trace->irq_events; |
| 3757 | 3759 | debug_atomic_inc(hardirqs_on_events); |
| 3758 | 3760 | } |
| 3759 | 3761 | EXPORT_SYMBOL_GPL(lockdep_hardirqs_on); |
| @@ -3763,8 +3765,6 @@ EXPORT_SYMBOL_GPL(lockdep_hardirqs_on); · 3 unmodified lines |
| 3763 | 3765 | */ |
| 3764 | 3766 | void noinstr lockdep_hardirqs_off(unsigned long ip) |
| 3765 | 3767 | { |
| 3766 | | − struct task_struct *curr = current; |
| 3767 | | − |
| 3768 | 3768 | if (unlikely(!debug_locks)) |
| 3769 | 3769 | return; |
| 3770 | 3770 | |
| @@ -3784,12 +3784,14 @@ void noinstr lockdep_hardirqs_off(unsigned long ip) · 13 unmodified lines |
| 3784 | 3784 | return; |
| 3785 | 3785 | |
| 3786 | 3786 | if (lockdep_hardirqs_enabled()) { |
| 3787 | + struct irqtrace_events *trace = ¤t->irqtrace; |
| 3788 | + |
| 3787 | 3789 | /* |
| 3788 | 3790 | * We have done an ON -> OFF transition: |
| 3789 | 3791 | */ |
| 3790 | 3792 | this_cpu_write(hardirqs_enabled, 0); |
| 3791 | | − curr->hardirq_disable_ip = ip; |
| 3792 | | − curr->hardirq_disable_event = ++curr->irq_events; |
| 3793 | + trace->hardirq_disable_ip = ip; |
| 3794 | + trace->hardirq_disable_event = ++trace->irq_events; |
| 3793 | 3795 | debug_atomic_inc(hardirqs_off_events); |
| 3794 | 3796 | } else { |
| 3795 | 3797 | debug_atomic_inc(redundant_hardirqs_off); |
| @@ -3802,7 +3804,7 @@ EXPORT_SYMBOL_GPL(lockdep_hardirqs_off); · 6 unmodified lines |
| 3802 | 3804 | */ |
| 3803 | 3805 | void lockdep_softirqs_on(unsigned long ip) |
| 3804 | 3806 | { |
| 3805 | | − struct task_struct *curr = current; |
| 3807 | + struct irqtrace_events *trace = ¤t->irqtrace; |
| 3806 | 3808 | |
| 3807 | 3809 | if (unlikely(!debug_locks || current->lockdep_recursion)) |
| 3808 | 3810 | return; |
| @@ -3814,7 +3816,7 @@ void lockdep_softirqs_on(unsigned long ip) · 5 unmodified lines |
| 3814 | 3816 | if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) |
| 3815 | 3817 | return; |
| 3816 | 3818 | |
| 3817 | | − if (curr->softirqs_enabled) { |
| 3819 | + if (current->softirqs_enabled) { |
| 3818 | 3820 | debug_atomic_inc(redundant_softirqs_on); |
| 3819 | 3821 | return; |
| 3820 | 3822 | } |
| @@ -3823,9 +3825,9 @@ void lockdep_softirqs_on(unsigned long ip) · 2 unmodified lines |
| 3823 | 3825 | /* |
| 3824 | 3826 | * We'll do an OFF -> ON transition: |
| 3825 | 3827 | */ |
| 3826 | | − curr->softirqs_enabled = 1; |
| 3827 | | − curr->softirq_enable_ip = ip; |
| 3828 | | − curr->softirq_enable_event = ++curr->irq_events; |
| 3828 | + current->softirqs_enabled = 1; |
| 3829 | + trace->softirq_enable_ip = ip; |
| 3830 | + trace->softirq_enable_event = ++trace->irq_events; |
| 3829 | 3831 | debug_atomic_inc(softirqs_on_events); |
| 3830 | 3832 | /* |
| 3831 | 3833 | * We are going to turn softirqs on, so set the |
| @@ -3833,7 +3835,7 @@ void lockdep_softirqs_on(unsigned long ip) · 1 unmodified line |
| 3833 | 3835 | * enabled too: |
| 3834 | 3836 | */ |
| 3835 | 3837 | if (lockdep_hardirqs_enabled()) |
| 3836 | | − mark_held_locks(curr, LOCK_ENABLED_SOFTIRQ); |
| 3838 | + mark_held_locks(current, LOCK_ENABLED_SOFTIRQ); |
| 3837 | 3839 | lockdep_recursion_finish(); |
| 3838 | 3840 | } |
| 3839 | 3841 | |
| @@ -3842,8 +3844,6 @@ void lockdep_softirqs_on(unsigned long ip) · 2 unmodified lines |
| 3842 | 3844 | */ |
| 3843 | 3845 | void lockdep_softirqs_off(unsigned long ip) |
| 3844 | 3846 | { |
| 3845 | | − struct task_struct *curr = current; |
| 3846 | | − |
| 3847 | 3847 | if (unlikely(!debug_locks || current->lockdep_recursion)) |
| 3848 | 3848 | return; |
| 3849 | 3849 | |
| @@ -3853,13 +3853,15 @@ void lockdep_softirqs_off(unsigned long ip) · 3 unmodified lines |
| 3853 | 3853 | if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) |
| 3854 | 3854 | return; |
| 3855 | 3855 | |
| 3856 | | − if (curr->softirqs_enabled) { |
| 3856 | + if (current->softirqs_enabled) { |
| 3857 | + struct irqtrace_events *trace = ¤t->irqtrace; |
| 3858 | + |
| 3857 | 3859 | /* |
| 3858 | 3860 | * We have done an ON -> OFF transition: |
| 3859 | 3861 | */ |
| 3860 | | − curr->softirqs_enabled = 0; |
| 3861 | | − curr->softirq_disable_ip = ip; |
| 3862 | | − curr->softirq_disable_event = ++curr->irq_events; |
| 3862 | + current->softirqs_enabled = 0; |
| 3863 | + trace->softirq_disable_ip = ip; |
| 3864 | + trace->softirq_disable_event = ++trace->irq_events; |
| 3863 | 3865 | debug_atomic_inc(softirqs_off_events); |
| 3864 | 3866 | /* |
| 3865 | 3867 | * Whoops, we wanted softirqs off, so why aren't they? |