[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53A3AA70.5090401@zytor.com>
Date: Thu, 19 Jun 2014 20:28:48 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Dave Hansen <dave.hansen@...el.com>,
Borislav Petkov <bp@...en8.de>,
Qiaowei Ren <qiaowei.ren@...el.com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 03/10] x86, mpx: add macro cpu_has_mpx
On 06/19/2014 11:50 AM, Dave Hansen wrote:
> On 06/19/2014 11:02 AM, H. Peter Anvin wrote:
>> On 06/18/2014 09:25 AM, Dave Hansen wrote:
>>> How about something like the attached patch?
>>>
>>> This lets us use static_cpu_has() for the checks, and allows us to
>>> easily add new checks for other features that might be compile-time
>>> disabled.
>>
>> Hmm... I would like something similar to required-features.h which
>> reflect features which *cannot* be enabled or will always be ignored; we
>> actually already have a handful of those
>
> Could you elaborate a bit? I'll try and include them in the approach to
> make sure it works broadly.
>
> Is there a benefit to the required-features.h approach that's missing
> from mine? I _believe_ all of the compiler optimization around
> __builtin_constant_p() continues to work with the inline function
> instead of the #defines and bitmasks. I think the inline function
> approach is a bit easier to work with.
>
> Could the required-features.h approach just be from a time before
> __builtin_constant_p() worked well across inlines?
>
Not so much. What I don't want is one approach for doing things in one
direction and another approach for the other direction.
-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