]> err.no Git - linux-2.6/blobdiff - kernel/hrtimer.c
[PATCH] Define __raw_get_cpu_var and use it
[linux-2.6] / kernel / hrtimer.c
index 18324305724a0b5b6753c1e4dec2219d3e15e9fc..9587aac72f4d80ef655252ec89dcef255613e0bf 100644 (file)
@@ -576,7 +576,7 @@ void hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
 
        memset(timer, 0, sizeof(struct hrtimer));
 
-       bases = per_cpu(hrtimer_bases, raw_smp_processor_id());
+       bases = __raw_get_cpu_var(hrtimer_bases);
 
        if (clock_id == CLOCK_REALTIME && mode != HRTIMER_ABS)
                clock_id = CLOCK_MONOTONIC;
@@ -599,7 +599,7 @@ int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp)
 {
        struct hrtimer_base *bases;
 
-       bases = per_cpu(hrtimer_bases, raw_smp_processor_id());
+       bases = __raw_get_cpu_var(hrtimer_bases);
        *tp = ktime_to_timespec(bases[which_clock].resolution);
 
        return 0;