linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: mingo@kernel.org, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	jolsa@redhat.com, alexey.budankov@linux.intel.com,
	songliubraving@fb.com, acme@redhat.com, allison@lohutok.net,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 05/11] tools/lib/lockdep: add definition required for IRQ flag tracing
Date: Mon, 17 Feb 2020 21:41:27 -0500	[thread overview]
Message-ID: <20200218024133.5059-6-sashal@kernel.org> (raw)
In-Reply-To: <20200218024133.5059-1-sashal@kernel.org>

We are going to start building with CONFIG_TRACE_IRQFLAGS defined, so
let's wire up a few dummy variables in our task_struct.

This isn't needed in userspace, but due to some refactoring in
kernel-side lockdep it's easier to just wire it up and enable
CONFIG_TRACE_IRQFLAGS.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/include/linux/lockdep.h | 8 ++++++++
 tools/lib/lockdep/lockdep.c   | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/include/linux/lockdep.h b/tools/include/linux/lockdep.h
index e56997288f2b0..3a9924d6d3ae8 100644
--- a/tools/include/linux/lockdep.h
+++ b/tools/include/linux/lockdep.h
@@ -23,6 +23,8 @@
 
 #include "../../../include/linux/lockdep.h"
 
+static bool early_boot_irqs_disabled;
+
 struct task_struct {
 	u64 curr_chain_key;
 	int lockdep_depth;
@@ -31,6 +33,12 @@ struct task_struct {
 	gfp_t lockdep_reclaim_gfp;
 	int pid;
 	int state;
+	int softirqs_enabled, hardirqs_enabled, softirqs_disabled, hardirqs_disabled, irq_events;
+	unsigned long softirq_disable_ip, softirq_enable_ip;
+	unsigned int softirq_disable_event, softirq_enable_event;
+	unsigned long hardirq_disable_ip, hardirq_enable_ip;
+	unsigned int hardirq_disable_event, hardirq_enable_event;
+	int softirq_context, hardirq_context;
 	char comm[17];
 };
 
diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c
index 348a9d0fb766a..9be12d233477a 100644
--- a/tools/lib/lockdep/lockdep.c
+++ b/tools/lib/lockdep/lockdep.c
@@ -15,10 +15,10 @@ u32 prandom_u32(void)
 	abort();
 }
 
-void print_irqtrace_events(struct task_struct *curr)
+/*void print_irqtrace_events(struct task_struct *curr)
 {
 	abort();
-}
+}*/
 
 static struct new_utsname *init_utsname(void)
 {
-- 
2.20.1


  parent reply	other threads:[~2020-02-18  2:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18  2:41 [PATCH 00/11] Fix up liblockdep for 5.6-rc Sasha Levin
2020-02-18  2:41 ` [PATCH 01/11] tools headers: Add kprobes.h header Sasha Levin
2020-02-18  2:41 ` [PATCH 02/11] tools headers: Add rcupdate.h header Sasha Levin
2020-02-18  2:41 ` [PATCH 03/11] tools/kernel.h: extend with dummy RCU functions Sasha Levin
2020-02-18  2:41 ` [PATCH 04/11] tools bitmap: add bitmap_andnot definition Sasha Levin
2020-02-18  2:41 ` Sasha Levin [this message]
2020-02-18  2:41 ` [PATCH 06/11] tools/kernel.h: add BUILD_BUG_ON_NOT_POWER_OF_2 macro Sasha Levin
2020-02-18  2:41 ` [PATCH 07/11] tools bitmap: add bitmap_clear definition Sasha Levin
2020-02-18  2:41 ` [PATCH 08/11] tools/lib/lockdep: Hook up vsprintf, find_bit, hweight libraries Sasha Levin
2020-02-18  2:41 ` [PATCH 09/11] tools/lib/lockdep: Enable building with CONFIG_TRACE_IRQFLAGS Sasha Levin
2020-02-18  2:41 ` [PATCH 10/11] tools/lib/lockdep: New stacktrace API Sasha Levin
2020-02-18  2:41 ` [PATCH 11/11] tools/lib/lockdep: call lockdep_init_task on init Sasha Levin

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=20200218024133.5059-6-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexey.budankov@linux.intel.com \
    --cc=allison@lohutok.net \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    --cc=tglx@linutronix.de \
    /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).