Kernel 2.6.38.8 has also renamed current_cpu_data.
See attached patch for fix.

On Tue, Jun 28, 2011 at 6:59 PM, Philippe Gerum <[email protected]> wrote:
> On Tue, 2011-06-28 at 18:25 +0200, Daniele Nicolodi wrote:
>> On 28/06/11 16:24, Philippe Gerum wrote:
>> >> Thanks Gilles for the quick answer, but that's not the problem, NMI
>> >> watchdog option is already disabled (and looking at the source code
>> >> looks like the error comes from a section of the code that is not
>> >> affected by XENO_NMI_DEBUG_LATENCY.
>> >>
>> >> Cheers,
>> >
>> > https://mail.gna.org/public/xenomai-help/2011-06/msg00142.html
>>
>> Thank you Philippe. I should follow the mailing list more closely.
>
> Actually, I should have pushed the necessary bits way earlier to the
> repo.
>
>>
>> Cheers,
>
> --
> Philippe.
>
>
>
> _______________________________________________
> Xenomai-help mailing list
> [email protected]
> https://mail.gna.org/listinfo/xenomai-help
>
Index: xenomai-2.5.6/include/asm-x86/calibration.h
===================================================================
--- xenomai-2.5.6.orig/include/asm-x86/calibration.h	2011-06-28 20:31:23.000000000 +0200
+++ xenomai-2.5.6/include/asm-x86/calibration.h	2011-06-28 20:33:08.000000000 +0200
@@ -45,7 +45,11 @@
 	 * the approach is definitely saner than previous attempts to
 	 * guess such value dynamically.
 	 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 #define __bogomips (current_cpu_data.loops_per_jiffy/(500000/HZ))
+#else
+#define __bogomips (cpu_info.loops_per_jiffy/(500000/HZ))
+#endif
 	sched_latency = (__bogomips < 250 ? 17000 :
 			 __bogomips < 2500 ? 4200 :
 			 3500);
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to