android_kernel_oneplus_msm8998/arch
Borislav Petkov c597f98755 x86/hweight: Get rid of the special calling convention
commit f5967101e9de12addcda4510dfbac66d7c5779c3 upstream.

People complained about ARCH_HWEIGHT_CFLAGS and how it throws a wrench
into kcov, lto, etc, experimentations.

Add asm versions for __sw_hweight{32,64}() and do explicit saving and
restoring of clobbered registers. This gets rid of the special calling
convention. We get to call those functions on !X86_FEATURE_POPCNT CPUs.

We still need to hardcode POPCNT and register operands as some old gas
versions which we support, do not know about POPCNT.

Btw, remove redundant REX prefix from 32-bit POPCNT because alternatives
can do padding now.

Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1464605787-20603-1-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-24 09:32:04 +02:00
..
alpha vgacon: Set VGA struct resource types 2018-03-24 10:58:48 +01:00
arc ARC: uaccess: dont use "l" gcc inline asm constraint modifier 2018-01-10 09:27:11 +01:00
arm xen: avoid type warning in xchg_xen_ulong 2018-04-13 19:50:20 +02:00
arm64 arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage 2018-04-13 19:50:15 +02:00
avr32 avr32: off by one in at32_init_pio() 2016-10-07 15:23:45 +02:00
blackfin pinctrl: adi2: Fix Kconfig build problem 2017-12-20 10:05:00 +01:00
c6x c6x/ptrace: Remove useless PTRACE_SETREGSET implementation 2017-03-31 09:49:53 +02:00
cris cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected 2017-01-12 11:22:48 +01:00
frv frv: declare jiffies to be located in the .data section 2018-04-08 11:51:57 +02:00
h8300 h8300/ptrace: Fix incorrect register transfer count 2017-03-31 09:49:53 +02:00
hexagon hexagon: fix strncpy_from_user() error return 2016-09-24 10:07:44 +02:00
ia64 ia64: fix module loading for gcc-5.4 2018-03-24 10:58:45 +01:00
m32r m32r: fix __get_user() 2016-09-24 10:07:43 +02:00
m68k m68k: Fix ndelay() macro 2016-12-15 08:49:23 -08:00
metag metag/uaccess: Check access_ok in strncpy_from_user 2017-05-25 14:30:16 +02:00
microblaze microblaze: fix copy_from_user() 2016-09-24 10:07:43 +02:00
mips MIPS: kprobes: flush_insn_slot should flush only if probe initialised 2018-04-13 19:50:19 +02:00
mn10300 mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy 2018-02-16 20:09:47 +01:00
nios2 nios2: reserve boot memory for device tree 2017-04-12 12:38:34 +02:00
openrisc signal/openrisc: Fix do_unaligned_access to send the proper signal 2018-02-16 20:09:46 +01:00
parisc parisc: Fix out of array access in match_pci_device() 2018-04-24 09:32:03 +02:00
powerpc powerpc/spufs: Fix coredump of SPU contexts 2018-04-13 19:50:16 +02:00
s390 s390/ipl: ensure loadparm valid flag is set 2018-04-24 09:32:04 +02:00
score score: fix copy_from_user() and friends 2016-09-24 10:07:44 +02:00
sh SolutionEngine771x: fix Ether platform data 2018-03-03 10:19:45 +01:00
sparc sparc64: ldc abort during vds iso boot 2018-04-13 19:50:20 +02:00
tile mm: larger stack guard gap, between vmas 2017-06-26 07:13:11 +02:00
um um: link vmlinux with -no-pie 2018-01-31 12:06:12 +01:00
unicore32 pwm: Changes for v4.4-rc1 2015-11-11 09:16:10 -08:00
x86 x86/hweight: Get rid of the special calling convention 2018-04-24 09:32:04 +02:00
xtensa xtensa: fix futex_atomic_cmpxchg_inatomic 2018-02-16 20:09:47 +01:00
.gitignore
Kconfig