linux_dsm_epyc7002/arch
Andy Lutomirski c198b121b1 x86/asm: Rewrite sync_core() to use IRET-to-self
Aside from being excessively slow, CPUID is problematic: Linux runs
on a handful of CPUs that don't have CPUID.  Use IRET-to-self
instead.  IRET-to-self works everywhere, so it makes testing easy.

For reference, On my laptop, IRET-to-self is ~110ns,
CPUID(eax=1, ecx=0) is ~83ns on native and very very slow under KVM,
and MOV-to-CR2 is ~42ns.

While we're at it: sync_core() serves a very specific purpose.
Document it.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Matthew Whitehead <tedheadster@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel <Xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/5c79f0225f68bc8c40335612bf624511abb78941.1481307769.git.luto@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-12-19 11:54:21 +01:00
..
alpha Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2016-12-14 14:09:48 -08:00
arc ARC updates for 4.10-rc1 (part 1) 2016-12-15 14:15:17 -08:00
arm MTD updates for v4.10-rc1: 2016-12-17 16:41:10 -08:00
arm64 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-18 11:12:53 -08:00
avr32 arch/avr32: add option to skip sync on DMA map 2016-12-14 16:04:07 -08:00
blackfin Merge branch 'akpm' (patches from Andrew) 2016-12-14 17:25:18 -08:00
c6x arch/c6x: add option to skip sync on DMA map and unmap 2016-12-14 16:04:07 -08:00
cris Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2016-12-14 14:09:48 -08:00
frv arch/frv: add option to skip sync on DMA map 2016-12-14 16:04:07 -08:00
h8300 locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
hexagon arch/hexagon: Add option to skip DMA sync as a part of mapping 2016-12-14 16:04:07 -08:00
ia64 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-18 11:12:53 -08:00
m32r m32r: fix build warning 2016-12-12 18:55:06 -08:00
m68k arch/m68k: add option to skip DMA sync as a part of mapping 2016-12-14 16:04:07 -08:00
metag arch/metag: add option to skip DMA sync as a part of map and unmap 2016-12-14 16:04:07 -08:00
microblaze arch/microblaze: add option to skip DMA sync as a part of map and unmap 2016-12-14 16:04:07 -08:00
mips RTC for 4.10 2016-12-18 18:18:03 -08:00
mn10300 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 10:48:02 -08:00
nios2 nios2 update for v4.10-rc1 2016-12-16 09:33:16 -08:00
openrisc arch/openrisc: add option to skip DMA sync as a part of mapping 2016-12-14 16:04:07 -08:00
parisc arch/parisc: add option to skip DMA sync as a part of map and unmap 2016-12-14 16:04:07 -08:00
powerpc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-12-17 18:44:00 -08:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-12-16 09:05:25 -08:00
score locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
sh Merge branch 'akpm' (patches from Andrew) 2016-12-14 17:25:18 -08:00
sparc sparc: implement watchdog_nmi_enable and watchdog_nmi_disable 2016-12-14 16:04:08 -08:00
tile Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2016-12-17 17:05:49 -08:00
um Merge branch 'for-linus-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2016-12-16 09:35:03 -08:00
unicore32 locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
x86 x86/asm: Rewrite sync_core() to use IRET-to-self 2016-12-19 11:54:21 +01:00
xtensa arch/xtensa: add option to skip DMA sync as a part of mapping 2016-12-14 16:04:08 -08:00
.gitignore
Kconfig Minor changes to the gcc plugins: 2016-12-13 09:22:21 -08:00