]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'v4.3-rc5' into timers/core, to pick up fixes before applying new changes
authorIngo Molnar <mingo@kernel.org>
Mon, 12 Oct 2015 07:51:18 +0000 (09:51 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 12 Oct 2015 07:51:18 +0000 (09:51 +0200)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/time/clocksource.c
kernel/time/hrtimer.c
kernel/time/timekeeping.c
kernel/time/timer.c

index 3a38775b50c2243ea83341a9034a0eb4e3a502a3..0d8fe8b8f72772e0899662c29011d1d22c261c8f 100644 (file)
@@ -479,7 +479,7 @@ static u32 clocksource_max_adjustment(struct clocksource *cs)
  * return half the number of nanoseconds the hardware counter can technically
  * cover. This is done so that we can potentially detect problems caused by
  * delayed timers or bad hardware, which might result in time intervals that
- * are larger then what the math used can handle without overflows.
+ * are larger than what the math used can handle without overflows.
  */
 u64 clocks_calc_max_nsecs(u32 mult, u32 shift, u32 maxadj, u64 mask, u64 *max_cyc)
 {
@@ -595,16 +595,15 @@ static void __clocksource_select(bool skipcur)
  */
 static void clocksource_select(void)
 {
-       return __clocksource_select(false);
+       __clocksource_select(false);
 }
 
 static void clocksource_select_fallback(void)
 {
-       return __clocksource_select(true);
+       __clocksource_select(true);
 }
 
 #else /* !CONFIG_ARCH_USES_GETTIMEOFFSET */
-
 static inline void clocksource_select(void) { }
 static inline void clocksource_select_fallback(void) { }
 
index 457a373e21812be2d06d52e500e7b490da8a4c67..435b8850dd80a300c11ad128bc0cf51e3c23e15a 100644 (file)
@@ -59,7 +59,7 @@
 /*
  * The timer bases:
  *
- * There are more clockids then hrtimer bases. Thus, we index
+ * There are more clockids than hrtimer bases. Thus, we index
  * into the timer bases by the hrtimer_base_type enum. When trying
  * to reach a base using a clockid, hrtimer_clockid_to_base()
  * is used to convert from clockid to the proper hrtimer_base_type.
index 3739ac6aa47355e7234cf0ee2fc60ebc3adce979..125f16a29cf6b54e7d7ec8e28580c65968a5466e 100644 (file)
@@ -1674,7 +1674,7 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 offset)
 /**
  * accumulate_nsecs_to_secs - Accumulates nsecs into secs
  *
- * Helper function that accumulates a the nsecs greater then a second
+ * Helper function that accumulates the nsecs greater than a second
  * from the xtime_nsec field to the xtime_secs field.
  * It also calls into the NTP code to handle leapsecond processing.
  *
@@ -1726,7 +1726,7 @@ static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset,
        cycle_t interval = tk->cycle_interval << shift;
        u64 raw_nsecs;
 
-       /* If the offset is smaller then a shifted interval, do nothing */
+       /* If the offset is smaller than a shifted interval, do nothing */
        if (offset < interval)
                return offset;
 
index 84190f02b521c9fc77cee6e6a6722000939ee470..74591ba9474f4dff4e0c3d7b7acedbe14b5d57a8 100644 (file)
@@ -461,10 +461,17 @@ void __timer_stats_timer_set_start_info(struct timer_list *timer, void *addr)
 
 static void timer_stats_account_timer(struct timer_list *timer)
 {
-       if (likely(!timer->start_site))
+       void *site;
+
+       /*
+        * start_site can be concurrently reset by
+        * timer_stats_timer_clear_start_info()
+        */
+       site = READ_ONCE(timer->start_site);
+       if (likely(!site))
                return;
 
-       timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
+       timer_stats_update_stats(timer, timer->start_pid, site,
                                 timer->function, timer->start_comm,
                                 timer->flags);
 }
@@ -867,7 +874,7 @@ unsigned long apply_slack(struct timer_list *timer, unsigned long expires)
        if (mask == 0)
                return expires;
 
-       bit = find_last_bit(&mask, BITS_PER_LONG);
+       bit = __fls(mask);
 
        mask = (1UL << bit) - 1;