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