This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+
- From: James Bottomley <James dot Bottomley at HansenPartnership dot com>
- To: systemtap at sourceware dot org, linux-kernel <linux-kernel at vger dot kernel dot org>
- Date: Thu, 17 Jul 2008 11:51:16 -0500
- Subject: [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=2007; t=1216313478; bh=ukQmN/s6lZh/aJxuu6x10CmykxmP89Z72iAhiloLUK c=; l=990; h=Subject:From:To:Content-Type:Date:Message-Id: Mime-Version:Content-Transfer-Encoding; b=K+JG9aW7ShGPaIq5UXQJVHW9 uEN9oTsAD5Bu8yaEzb7zNHcqdnsok1M7pZ9DYlqziwux/Os/lIerWRFdiiJxE0xNj+Y QGp0PDS2F56sKS2PozfuImMSDoOZCLY04YrJUcj8bfnJFk+zDIkK4hZr0PsZib8UOeV EHWq55BjvGRiA=
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=2007; t=1216313477; bh=ukQmN/s6lZh/aJxuu6x10CmykxmP89Z72iAhiloLUK c=; l=990; h=Subject:From:To:Content-Type:Date:Message-Id: Mime-Version:Content-Transfer-Encoding; b=XWLDA9lk7LNW4gbP67UEcJKK Jbw2rAgfN5ZakERQOgEgRAV5NhqCh/LwYssDhFFFOhc8ngpseER3FOBpXlYEdWfKldQ UIvXnen9WG3zEYNKYEBTtW80qByArtl6zCtPROgHiOI1WlQ5JDhaGpXHLgWrDE58r0z Ift/TPTn7+WME=
In kernel 2.6.26, this patch
commit 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d
Author: Jens Axboe <jens.axboe@oracle.com>
Date: Fri May 9 09:39:44 2008 +0200
on_each_cpu(): kill unused 'retry' parameter
means that runtime/time.c is now using the wrong calling conventions.
Fix this up and surround it by kernel versioning #ifdefs.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
runtime/time.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/runtime/time.c b/runtime/time.c
index 8a0b6fa..fffdfe0 100644
--- a/runtime/time.c
+++ b/runtime/time.c
@@ -237,7 +237,12 @@ _stp_init_time(void)
return -1;
stp_timer_reregister = 1;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
ret = on_each_cpu(__stp_init_time, NULL, 0, 1);
+#else
+ ret = on_each_cpu(__stp_init_time, NULL, 1);
+#endif
+
#ifdef CONFIG_CPU_FREQ
if (!ret && !__stp_constant_freq()) {
--
1.5.6