[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTin=GXnLuDZncSL9rWKh5teCQP=3iQB-Rz8zxsnk@mail.gmail.com>
Date: Wed, 15 Dec 2010 22:48:33 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>, Tejun Heo <tj@...nel.org>,
Pekka Enbeerg <penberg@...helsinki.fi>,
linux-kernel@...r.kernel.org,
Eric Dumazet <eric.dumazet@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: x86: A fast way to check capabilities of the current cpu
On Wed, Dec 15, 2010 at 10:39 PM, H. Peter Anvin <hpa@...or.com> wrote:
> On 12/15/2010 01:30 PM, Miguel Ojeda wrote:
>>
>> In this case it this_cpu_*_test_bit() return an int, but they act as a
>> bool and are used in if()s; where is the catch?
>>
>
> If they aren't, and are stored in a variable for whatever reason, then
> the || form will generate additional instructions to booleanize the
> value for no good reason.
Thanks! I suppose that is the 't' of being "a fast way" ;-)
>
> -hpa
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists