Messages in this thread Patch in this message | | | From | Nadav Amit <> | Subject | [RFC PATCH 3/3] x86/mm/tlb: Use lockdep irq assertions | Date | Fri, 23 Aug 2019 15:46:35 -0700 |
| |
The assertions that check whether IRQs are disabled depend currently on different debug features. Use instead lockdep_assert_irqs_disabled(), which is standard, enabled by the same debug feature, and provides more information upon failures.
Signed-off-by: Nadav Amit <namit@vmware.com> --- arch/x86/mm/tlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index ba50430275d4..6f4ce02e2c5b 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -293,8 +293,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next, */ /* We don't want flush_tlb_func() to run concurrently with us. */ - if (IS_ENABLED(CONFIG_PROVE_LOCKING)) - WARN_ON_ONCE(!irqs_disabled()); + lockdep_assert_irqs_disabled(); /* * Verify that CR3 is what we think it is. This will catch @@ -643,7 +642,7 @@ static void flush_tlb_func(void *info) unsigned long nr_invalidate = 0; /* This code cannot presently handle being reentered. */ - VM_WARN_ON(!irqs_disabled()); + lockdep_assert_irqs_disabled(); if (!local) { inc_irq_stat(irq_tlb_count); -- 2.17.1
| |