aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2014-09-10 14:57:16 -0500
committerAnders Roxell <anders.roxell@linaro.org>2014-09-29 11:15:03 +0200
commit1b46962fdbb384716daf718c44e894af83050736 (patch)
tree19670d013ce49455f5348e02e23f66747137df32
parentfe617ad8f9e9db59a3c27b9955712683ff927642 (diff)
hrtimer.h: prevent pinned timer state from breaking inactive testInitial_commit_of_LSK-based_LNG_kernel
An hrtimer may be pinned to a CPU but inactive, so it is no longer valid to test the hrtimer.state struct member as having no bits set when inactive. Changed the test function to mask out the HRTIMER_STATE_PINNED bit when checking for inactive state. Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
-rw-r--r--include/linux/hrtimer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 9f593e8a561b..36fcc90b794a 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -404,7 +404,7 @@ extern ktime_t hrtimer_get_next_event(void);
*/
static inline int hrtimer_active(const struct hrtimer *timer)
{
- return timer->state != HRTIMER_STATE_INACTIVE;
+ return (timer->state & (~HRTIMER_STATE_PINNED)) != HRTIMER_STATE_INACTIVE;
}
/*