[PATCH] Fix the conflicted for_each_cpu macro with 2.6.28-rc4
Srikar Dronamraju
srikar@linux.vnet.ibm.com
Tue Nov 18 04:39:00 GMT 2008
* 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
More information about the Systemtap
mailing list