Re: [PATCH v15] x86/split_lock: Enable split lock detection by kernel

From: Arvind Sankar
Date: Sat Jan 25 2020 - 18:51:57 EST


On Sat, Jan 25, 2020 at 01:50:03PM -0800, Luck, Tony wrote:
> >
> > I might be missing something but shouldnt this be !nextflag given the
> > flag being unset is when the task wants sld?
>
> That logic is convoluted ... but Thomas showed me a much better
> way that is also much simpler ... so this code has gone now. The
> new version is far easier to read (argument is flags for the new task
> that we are switching to)
>
> void switch_to_sld(unsigned long tifn)
> {
> __sld_msr_set(tifn & _TIF_SLD);
> }
>
> -Tony

why doesnt this have the same problem though? tifn & _TIF_SLD still
needs to be logically negated no?