From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17581 invoked by alias); 19 Nov 2008 14:04:40 -0000 Received: (qmail 17510 invoked by uid 22791); 19 Nov 2008 14:04:38 -0000 X-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Nov 2008 14:04:03 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAJE41WQ006081 for ; Wed, 19 Nov 2008 09:04:01 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mAJE401o008022; Wed, 19 Nov 2008 09:04:01 -0500 Received: from blackpad.localdomain (vpn-10-1.str.redhat.com [10.32.10.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mAJE3xY9003367; Wed, 19 Nov 2008 09:04:00 -0500 Received: by blackpad.localdomain (Postfix, from userid 500) id 2CAF967F501; Wed, 19 Nov 2008 12:03:32 -0200 (BRST) From: Eduardo Habkost To: systemtap@sourceware.org Cc: Eduardo Habkost 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 Message-Id: <1227103412-9128-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00385.txt.bz2 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 --- 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