lkml.org 
[lkml]   [2013]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [gcv v3 27/35] arm: Replace __get_cpu_var uses
Hi again Christoph,

On Wed, Sep 04, 2013 at 09:58:31PM +0100, Christoph Lameter wrote:
> Here is a patch to be applied after the earlier one to convert the local_t
> use to this_cpu. Not sure if I got the local_dec_and_test conversion
> right.

[...]

> @@ -118,11 +117,11 @@ void disable_debug_monitors(enum debug_e
>
> WARN_ON(preemptible());
>
> - if (local_dec_and_test(this_cpu_ptr(&mde_ref_count)))
> + if (this_cpu_dec_return(mde_ref_count))
> disable = ~DBG_MDSCR_MDE;
>
> if (el == DBG_ACTIVE_EL1 &&
> - local_dec_and_test(this_cpu_ptr(&kde_ref_count)))
> + this_cpu_dec_return(kde_ref_count))
> disable &= ~DBG_MDSCR_KDE;

Almost! I think we just need an '== 0' check on the result from the
decrement, since local_dec_and_test is simply a way to check that we've
decremented to zero, so this patch would otherwise invert the meaning.

Will


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