[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200218024133.5059-6-sashal@kernel.org>
Date: Mon, 17 Feb 2020 21:41:27 -0500
From: Sasha Levin <sashal@...nel.org>
To: mingo@...nel.org, peterz@...radead.org
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, jolsa@...hat.com,
alexey.budankov@...ux.intel.com, songliubraving@...com,
acme@...hat.com, allison@...utok.net,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 05/11] tools/lib/lockdep: add definition required for IRQ flag tracing
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@...nel.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
Powered by blists - more mailing lists