This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Fix the conflicted for_each_cpu macro with 2.6.28-rc4
- From: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
- To: Wenji Huang <wenji dot huang at oracle dot com>
- Cc: systemTAP <systemtap at sources dot redhat dot com>
- Date: Tue, 18 Nov 2008 10:08:24 +0530
- 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>
- Reply-to: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
* Wenji Huang <wenji.huang@oracle.com> [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