[Xenomai-git] Henri Roosen : x86: rename current_cpu_data for 2.6.38 and later

2011-06-29 Thread GIT version control
Module: xenomai-head
Branch: master
Commit: 8d3870b999b12d2a5e3a2163b02b3375b0e9a10d
URL:
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=8d3870b999b12d2a5e3a2163b02b3375b0e9a10d

Author: Henri Roosen 
Date:   Wed Jun 29 19:37:24 2011 +0200

x86: rename current_cpu_data for 2.6.38 and later

---

 include/asm-x86/calibration.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/calibration.h b/include/asm-x86/calibration.h
index 9bdf942..7cd5ac9 100644
--- a/include/asm-x86/calibration.h
+++ b/include/asm-x86/calibration.h
@@ -45,7 +45,11 @@ static inline unsigned long xnarch_get_sched_latency (void)
 * 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/(50/HZ))
+#else
+#define __bogomips (cpu_info.loops_per_jiffy/(50/HZ))
+#endif
sched_latency = (__bogomips < 250 ? 17000 :
 __bogomips < 2500 ? 4200 :
 3500);


___
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git


[Xenomai-git] Henri Roosen : x86: rename current_cpu_data for 2.6.38 and later

2011-06-29 Thread GIT version control
Module: xenomai-2.5
Branch: master
Commit: 283dd7cda3d80b10c0a47886e8029198f6ac1fd2
URL:
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=283dd7cda3d80b10c0a47886e8029198f6ac1fd2

Author: Henri Roosen 
Date:   Wed Jun 29 19:37:24 2011 +0200

x86: rename current_cpu_data for 2.6.38 and later

---

 include/asm-x86/calibration.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/calibration.h b/include/asm-x86/calibration.h
index 9bdf942..7cd5ac9 100644
--- a/include/asm-x86/calibration.h
+++ b/include/asm-x86/calibration.h
@@ -45,7 +45,11 @@ static inline unsigned long xnarch_get_sched_latency (void)
 * 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/(50/HZ))
+#else
+#define __bogomips (cpu_info.loops_per_jiffy/(50/HZ))
+#endif
sched_latency = (__bogomips < 250 ? 17000 :
 __bogomips < 2500 ? 4200 :
 3500);


___
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git