lkml.org 
[lkml]   [2020]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] x86/split_lock: Bits in IA32_CORE_CAPABILITIES are not architectural
Date
"Luck, Tony" <tony.luck@intel.com> writes:

> On Fri, Apr 17, 2020 at 09:29:13PM +0200, Thomas Gleixner wrote:
>> "Luck, Tony" <tony.luck@intel.com> writes:
>> > On Fri, Apr 17, 2020 at 12:04:36PM +0200, Thomas Gleixner wrote:
>> > + if (!m->driver_data)
>> > + goto setup;
>> > + if (!cpu_has(c, X86_FEATURE_CORE_CAPABILITIES))
>> > + return;
>> > + rdmsrl(MSR_IA32_CORE_CAPS, ia32_core_caps);
>> > + if (!(ia32_core_caps & MSR_IA32_CORE_CAPS_SPLIT_LOCK_DETECT))
>> > + return;
>> > +setup:
>> > + split_lock_setup();
>>
>> Which looks nicer w/o the goto:
>>
>> if (m->driver_data) {
>> if (!cpu_has(c, X86_FEATURE_CORE_CAPABILITIES))
>> return;
>> rdmsrl(MSR_IA32_CORE_CAPS, ia32_core_caps);
>> if (!(ia32_core_caps & MSR_IA32_CORE_CAPS_SPLIT_LOCK_DETECT))
>> return;
>> }
>>
>> Hmm?
>
> Swings and roundabouts ... getting rid of the goto makes for
> deeper indentation. But if you really want to get rid of the
> goto, then your version is fine with me.
>
> Do you want me to spin it into v3?

Nah. I tweak it myself.

\
 
 \ /
  Last update: 2020-04-17 22:49    [W:0.051 / U:1.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site