From: Nadav Amit <namit@vmware.com>
To: Andy Lutomirski <luto@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Nadav Amit <namit@vmware.com>
Subject: [RFC PATCH 3/3] x86/mm/tlb: Use lockdep irq assertions
Date: Fri, 23 Aug 2019 15:46:35 -0700 [thread overview]
Message-ID: <20190823224635.15387-4-namit@vmware.com> (raw)
In-Reply-To: <20190823224635.15387-1-namit@vmware.com>
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
next prev parent reply other threads:[~2019-08-24 6:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 22:46 [RFC PATCH 0/3] x86/mm/tlb: Defer TLB flushes with PTI Nadav Amit
2019-08-23 22:46 ` [RFC PATCH 1/3] x86/mm/tlb: Defer PTI flushes Nadav Amit
2019-08-23 22:46 ` [RFC PATCH 2/3] x86/mm/tlb: Avoid deferring PTI flushes on shootdown Nadav Amit
2019-08-23 22:46 ` Nadav Amit [this message]
2019-08-24 6:09 ` [RFC PATCH 0/3] x86/mm/tlb: Defer TLB flushes with PTI Nadav Amit
2019-08-27 23:18 ` Andy Lutomirski
2019-08-27 23:52 ` Nadav Amit
2019-08-28 0:30 ` Andy Lutomirski
2019-08-29 17:23 ` Nadav Amit
2019-09-03 21:33 ` Andy Lutomirski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190823224635.15387-4-namit@vmware.com \
--to=namit@vmware.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).