diff options
author | Borislav Petkov <bp@suse.de> | 2016-12-03 16:02:58 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-12-20 09:36:42 +0100 |
commit | 34bfab0eaf0fb5c6fb14c6b4013b06cdc7984466 (patch) | |
tree | 332c3f082bb67dc8609d8a9c155698e590c736f4 /arch/arm/mach-mediatek | |
parent | x86/topology: Document cpu_llc_id (diff) | |
download | linux-34bfab0eaf0fb5c6fb14c6b4013b06cdc7984466.tar.xz linux-34bfab0eaf0fb5c6fb14c6b4013b06cdc7984466.zip |
x86/alternatives: Do not use sync_core() to serialize I$
We use sync_core() in the alternatives code to stop speculative
execution of prefetched instructions because we are potentially changing
them and don't want to execute stale bytes.
What it does on most machines is call CPUID which is a serializing
instruction. And that's expensive.
However, the instruction cache is serialized when we're on the local CPU
and are changing the data through the same virtual address. So then, we
don't need the serializing CPUID but a simple control flow change. Last
being accomplished with a CALL/RET which the noinline causes.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Whitehead <tedheadster@gmail.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20161203150258.vwr5zzco7ctgc4pe@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arm/mach-mediatek')
0 files changed, 0 insertions, 0 deletions