From: Jeremy Linton <jeremy.linton@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, rostedt@goodmis.org,
mingo@redhat.com, rusty@rustcorp.com.au, jeyu@redhat.com,
kirill.shutemov@linux.intel.com, christoffer.dall@linaro.org,
marc.zyngier@arm.com, jcm@jonmasters.org
Subject: [PATCH 05/12] trace: rename trace_enum_mutex to trace_eval_mutex
Date: Wed, 31 May 2017 16:56:46 -0500 [thread overview]
Message-ID: <20170531215653.3240-6-jeremy.linton@arm.com> (raw)
In-Reply-To: <20170531215653.3240-1-jeremy.linton@arm.com>
There is a lock protecting the trace_enum_map, rename
it to reflect the use by more than enums.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
kernel/trace/trace.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index af6ec07..e1bc56c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -138,7 +138,7 @@ struct trace_eval_map_tail {
const char *end; /* points to NULL */
};
-static DEFINE_MUTEX(trace_enum_mutex);
+static DEFINE_MUTEX(trace_eval_mutex);
/*
* The trace_eval_maps are saved in an array with two extra elements,
@@ -4758,7 +4758,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos)
union trace_eval_map_item *v;
loff_t l = 0;
- mutex_lock(&trace_enum_mutex);
+ mutex_lock(&trace_eval_mutex);
v = trace_eval_maps;
if (v)
@@ -4773,7 +4773,7 @@ static void *enum_map_start(struct seq_file *m, loff_t *pos)
static void enum_map_stop(struct seq_file *m, void *v)
{
- mutex_unlock(&trace_enum_mutex);
+ mutex_unlock(&trace_eval_mutex);
}
static int enum_map_show(struct seq_file *m, void *v)
@@ -4838,7 +4838,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start,
return;
}
- mutex_lock(&trace_enum_mutex);
+ mutex_lock(&trace_eval_mutex);
if (!trace_eval_maps)
trace_eval_maps = map_array;
@@ -4863,7 +4863,7 @@ trace_insert_enum_map_file(struct module *mod, struct trace_eval_map **start,
}
memset(map_array, 0, sizeof(*map_array));
- mutex_unlock(&trace_enum_mutex);
+ mutex_unlock(&trace_eval_mutex);
}
static void trace_create_enum_file(struct dentry *d_tracer)
@@ -7740,7 +7740,7 @@ static void trace_module_remove_enums(struct module *mod)
if (!mod->num_trace_evals)
return;
- mutex_lock(&trace_enum_mutex);
+ mutex_lock(&trace_eval_mutex);
map = trace_eval_maps;
@@ -7757,7 +7757,7 @@ static void trace_module_remove_enums(struct module *mod)
*last = trace_enum_jmp_to_tail(map)->tail.next;
kfree(map);
out:
- mutex_unlock(&trace_enum_mutex);
+ mutex_unlock(&trace_eval_mutex);
}
#else
static inline void trace_module_remove_enums(struct module *mod) { }
--
2.9.4
next prev parent reply other threads:[~2017-05-31 21:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 21:56 [PATCH 00/12] trace: add the ability to parse sizeof() Jeremy Linton
2017-05-31 21:56 ` [PATCH 01/12] trace: rename kernel enum section to eval Jeremy Linton
2017-05-31 21:56 ` [PATCH 02/12] trace: rename trace_enum_map to trace_eval_map Jeremy Linton
2017-05-31 21:56 ` [PATCH 03/12] trace: rename struct module entry for trace enums Jeremy Linton
2017-05-31 21:56 ` [PATCH 04/12] trace: rename trace enum data structures in trace.c Jeremy Linton
2017-05-31 21:56 ` Jeremy Linton [this message]
2017-05-31 21:56 ` [PATCH 06/12] trace: rename trace.c enum functions Jeremy Linton
2017-05-31 21:56 ` [PATCH 07/12] trace: rename enum_map functions Jeremy Linton
2017-05-31 21:56 ` [PATCH 08/12] tracing: Rename enum_replace to eval_replace Jeremy Linton
2017-05-31 21:56 ` [PATCH 09/12] tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their values Jeremy Linton
2017-05-31 21:56 ` [PATCH 10/12] tracing: Update sample file to describe the new macro Jeremy Linton
2017-06-13 21:07 ` Steven Rostedt
2017-05-31 21:56 ` [PATCH 11/12] tracing: Add TRACE_DEFINE_SIZEOF() macros Jeremy Linton
2017-05-31 21:56 ` [PATCH 12/12] tracing: Rename update the enum_map file Jeremy Linton
2017-06-13 21:12 ` Steven Rostedt
2017-06-13 21:21 ` Jeremy Linton
2017-06-14 17:06 ` Steven Rostedt
2017-06-14 18:43 ` Jeremy Linton
2017-06-01 1:11 ` [PATCH 00/12] trace: add the ability to parse sizeof() Steven Rostedt
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=20170531215653.3240-6-jeremy.linton@arm.com \
--to=jeremy.linton@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=jcm@jonmasters.org \
--cc=jeyu@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®