lkml.org 
[lkml]   [2013]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [pchecks v1 2/4] Use raw cpu ops for calls that would trigger with checks

* Christoph Lameter <cl@linux.com> wrote:

> Index: linux/kernel/hrtimer.c
> ===================================================================
> --- linux.orig/kernel/hrtimer.c 2013-09-12 13:26:29.216103951 -0500
> +++ linux/kernel/hrtimer.c 2013-09-12 13:26:29.212103994 -0500
> @@ -538,7 +538,7 @@ static inline int hrtimer_is_hres_enable
> */
> static inline int hrtimer_hres_active(void)
> {
> - return __this_cpu_read(hrtimer_bases.hres_active);
> + return raw_cpu_read(hrtimer_bases.hres_active);
> }

If cpu_read() is used, does this check trigger?

If yes, what makes ignoring the check safe? Per change explanation is
necessary for such annotations.

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-09-24 10:01    [W:0.030 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site