From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
Tom Zanussi <zanussi@kernel.org>
Subject: [for-linus][PATCH 05/15] tracing: Have synthetic event test use raw_smp_processor_id()
Date: Mon, 24 Feb 2020 12:20:27 -0500 [thread overview]
Message-ID: <20200224172116.608333548@goodmis.org> (raw)
In-Reply-To: 20200224172022.330525468@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
The test code that tests synthetic event creation pushes in as one of its
test fields the current CPU using "smp_processor_id()". As this is just
something to see if the value is correctly passed in, and the actual CPU
used does not matter, use raw_smp_processor_id(), otherwise with debug
preemption enabled, a warning happens as the smp_processor_id() is called
without preemption enabled.
Link: http://lkml.kernel.org/r/20200220162950.35162579@gandalf.local.home
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/synth_event_gen_test.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/trace/synth_event_gen_test.c b/kernel/trace/synth_event_gen_test.c
index 6866280a9b10..7d56d621ffea 100644
--- a/kernel/trace/synth_event_gen_test.c
+++ b/kernel/trace/synth_event_gen_test.c
@@ -114,7 +114,7 @@ static int __init test_gen_synth_cmd(void)
vals[1] = (u64)(long)"hula hoops"; /* next_comm_field */
vals[2] = 1000000; /* ts_ns */
vals[3] = 1000; /* ts_ms */
- vals[4] = smp_processor_id(); /* cpu */
+ vals[4] = raw_smp_processor_id(); /* cpu */
vals[5] = (u64)(long)"thneed"; /* my_string_field */
vals[6] = 598; /* my_int_field */
@@ -221,7 +221,7 @@ static int __init test_empty_synth_event(void)
vals[1] = (u64)(long)"tiddlywinks"; /* next_comm_field */
vals[2] = 1000000; /* ts_ns */
vals[3] = 1000; /* ts_ms */
- vals[4] = smp_processor_id(); /* cpu */
+ vals[4] = raw_smp_processor_id(); /* cpu */
vals[5] = (u64)(long)"thneed_2.0"; /* my_string_field */
vals[6] = 399; /* my_int_field */
@@ -293,7 +293,7 @@ static int __init test_create_synth_event(void)
vals[1] = (u64)(long)"tiddlywinks"; /* next_comm_field */
vals[2] = 1000000; /* ts_ns */
vals[3] = 1000; /* ts_ms */
- vals[4] = smp_processor_id(); /* cpu */
+ vals[4] = raw_smp_processor_id(); /* cpu */
vals[5] = (u64)(long)"thneed"; /* my_string_field */
vals[6] = 398; /* my_int_field */
@@ -345,7 +345,7 @@ static int __init test_add_next_synth_val(void)
goto out;
/* cpu */
- ret = synth_event_add_next_val(smp_processor_id(), &trace_state);
+ ret = synth_event_add_next_val(raw_smp_processor_id(), &trace_state);
if (ret)
goto out;
@@ -388,7 +388,7 @@ static int __init test_add_synth_val(void)
if (ret)
goto out;
- ret = synth_event_add_val("cpu", smp_processor_id(), &trace_state);
+ ret = synth_event_add_val("cpu", raw_smp_processor_id(), &trace_state);
if (ret)
goto out;
@@ -427,7 +427,7 @@ static int __init test_trace_synth_event(void)
(u64)(long)"clackers", /* next_comm_field */
(u64)1000000, /* ts_ns */
(u64)1000, /* ts_ms */
- (u64)smp_processor_id(),/* cpu */
+ (u64)raw_smp_processor_id(), /* cpu */
(u64)(long)"Thneed", /* my_string_field */
(u64)999); /* my_int_field */
return ret;
--
2.25.0
next prev parent reply other threads:[~2020-02-24 17:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 17:20 [for-linus][PATCH 00/15] tracing: Updates coming for 5.6 rc release Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 01/15] tracing: Make sure synth_event_trace() example always uses u64 Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 02/15] tracing: Make synth_event trace functions endian-correct Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 03/15] tracing: Check that number of vals matches number of synth event fields Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 04/15] tracing: Fix number printing bug in print_synth_event() Steven Rostedt
2020-02-24 17:20 ` Steven Rostedt [this message]
2020-02-24 17:20 ` [for-linus][PATCH 06/15] tracing: Disable trace_printk() on post poned tests Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 07/15] bootconfig: Mark boot_config_checksum() static Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 08/15] tracing: Clear trace_state when starting trace Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 09/15] bootconfig: Set CONFIG_BOOT_CONFIG=n by default Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 10/15] bootconfig: Add bootconfig magic word for indicating bootconfig explicitly Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 11/15] tools/bootconfig: Remove unneeded error message silencer Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 12/15] bootconfig: Reject subkey and value on same parent key Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 13/15] bootconfig: Print array as multiple commands for legacy command line Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 14/15] bootconfig: Prohibit re-defining value on same key Steven Rostedt
2020-02-24 17:20 ` [for-linus][PATCH 15/15] bootconfig: Add append value operator support 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=20200224172116.608333548@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=tom.zanussi@linux.intel.com \
--cc=zanussi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.