From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23193 invoked by alias); 18 Nov 2008 05:13:10 -0000 Received: (qmail 23135 invoked by uid 22791); 18 Nov 2008 05:13:09 -0000 X-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_JMF_W,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from acsinet11.oracle.com (HELO acsinet11.oracle.com) (141.146.126.233) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Nov 2008 05:12:27 +0000 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAI5Cs32015659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Nov 2008 05:12:56 GMT Received: from acsmt702.oracle.com (acsmt702.oracle.com [141.146.40.80]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAI5CL8L025527; Tue, 18 Nov 2008 05:12:22 GMT Received: from a.com (/10.182.120.164) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 17 Nov 2008 21:12:16 -0800 Message-ID: <49224D75.6080308@oracle.com> Date: Tue, 18 Nov 2008 05:13:00 -0000 From: Wenji Huang Reply-To: wenji.huang@oracle.com User-Agent: Thunderbird 2.0.0.12 (X11/20080213) MIME-Version: 1.0 To: Srikar Dronamraju CC: systemTAP Subject: Re: [PATCH] Fix the conflicted for_each_cpu macro with 2.6.28-rc4 References: <491D23A0.8090903@oracle.com> <492193FC.7060300@redhat.com> <49221F4F.3020905@oracle.com> <20081118043824.GA29346@linux.vnet.ibm.com> In-Reply-To: <20081118043824.GA29346@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: acsmt702.oracle.com [141.146.40.80] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.49224EB2.000E:SCFSTAT928724,ss=1,fgs=0 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/msg00371.txt.bz2 Srikar Dronamraju wrote: > * Wenji Huang [2008-11-18 09:50:07]: > >>>> -#ifndef for_each_cpu >>>> -#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) >>>> +#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) >>>> +#endif >>>> +#else >>>> +#ifndef stp_for_each_cpu >>>> +#define stp_for_each_cpu(cpu) for_each_cpu_mask((cpu), >>>> cpu_possible_map) >>>> +#endif >>>> #endif > > Why do we use for_each_cpu_mask always instead of using for_each_cpu if > its defined. That would make the code more concise. > > -- > Srikar Good point. Just worry if for_each_cpu_mask will be changed in the later kernel in terms of defined for_each_cpu. Regards, Wenji