From: Eduardo Habkost <ehabkost@redhat.com>
To: systemtap@sourceware.org
Cc: Eduardo Habkost <ehabkost@redhat.com>
Subject: [PATCH] stp_for_each_cpu: use for_each_possible_cpu() on kernel >= 2.6.28
Date: Wed, 19 Nov 2008 14:04:00 -0000 [thread overview]
Message-ID: <1227103412-9128-1-git-send-email-ehabkost@redhat.com> (raw)
It looks like for_each_cpu() interface has changed again on tip.git,
breaking stp_for_each_cpu.
The error I get when compiling a stap module here is:
/usr/local/share/systemtap/runtime/stat.c: In function â_stp_stat_getâ:
/usr/local/share/systemtap/runtime/stat.c:213: error: incompatible type for argument 2 of âcpumask_nextâ
Using for_each_possible_cpu() should be equivalent to
for_each_cpu(cpu, cpu_possible_map), but its interface didn't change
like for_each_cpu() did.
I kept the 2.6.28 #ifdef just in case, but for_each_possible_cpu()
should work even on older kernels.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
runtime/runtime.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 7507e59..90113b6 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -41,7 +41,7 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
#ifndef stp_for_each_cpu
-#define stp_for_each_cpu(cpu) for_each_cpu((cpu), cpu_possible_map)
+#define stp_for_each_cpu(cpu) for_each_possible_cpu((cpu))
#endif
#else
#ifndef stp_for_each_cpu
--
1.5.5.GIT
next reply other threads:[~2008-11-19 14:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-19 14:04 Eduardo Habkost [this message]
2008-11-19 14:44 ` Masami Hiramatsu
2008-11-19 15:26 ` Eduardo Habkost
2008-11-19 17:54 ` Masami Hiramatsu
2008-11-27 1:31 ` Wenji Huang
2008-11-20 13:54 Wenji Huang
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=1227103412-9128-1-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=systemtap@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).