hrtimers: Make struct hrtimer_cpu_base layout less stupid
authorThomas Gleixner <tglx@linutronix.de>
Fri, 20 May 2011 11:02:58 +0000 (13:02 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 23 May 2011 11:59:53 +0000 (13:59 +0200)
In the HIGHRES=y case we access the members at the end of struct
hrtimer_cpu_base first and then the one at the beginning. Move the
hrtimer data to front, so we have linear progressing access.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
include/linux/hrtimer.h

index 925c8c01db7b51b328a7440a5b503f6c1b638f67..cc5f5f51db1016801dbe7bf329da30a709d22549 100644 (file)
@@ -174,7 +174,6 @@ enum  hrtimer_base_type {
  */
 struct hrtimer_cpu_base {
        raw_spinlock_t                  lock;
-       struct hrtimer_clock_base       clock_base[HRTIMER_MAX_CLOCK_BASES];
 #ifdef CONFIG_HIGH_RES_TIMERS
        ktime_t                         expires_next;
        int                             hres_active;
@@ -184,6 +183,7 @@ struct hrtimer_cpu_base {
        unsigned long                   nr_hangs;
        ktime_t                         max_hang_time;
 #endif
+       struct hrtimer_clock_base       clock_base[HRTIMER_MAX_CLOCK_BASES];
 };
 
 static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)