lkml.org 
[lkml]   [2018]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/9] x86: alternatives: macrofy locks for better inlining
On Sun, Jun 10, 2018 at 07:19:06AM -0700, Nadav Amit wrote:
> #ifdef CONFIG_SMP
> +.macro LOCK_PREFIX_HERE
> .pushsection .smp_locks,"a"
> .balign 4
> + .long 671f - . # offset
> .popsection
> +671:
> +.endm
> +
> +.macro LOCK_PREFIX insn:vararg
> + LOCK_PREFIX_HERE
> + lock \insn
> +.endm

Hurmph, the only reason we need to preserve that LOCK_PREFIX_HERE thing
is arch_cmpxchg64 in cmpxchg_32.h. Is there really no other way we can
write that one?

I suppose the problem with using LOCK_PREFIX inside the alternative is
that the .smp_locks fixup address gets computed wrong (inside the
alternative_text section instead of in the regular text)?

Oh well..

\
 
 \ /
  Last update: 2018-06-11 10:03    [W:0.214 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site