linux_dsm_epyc7002/arch/arm64
Will Deacon a14949e09a arm64: cmpxchg: truncate sub-word signed types before comparison
When performing a cmpxchg operation on a signed sub-word type (e.g. s8),
we need to ensure that the upper register bits of the "old" value used
for comparison are zeroed, otherwise we may erroneously fail the cmpxchg
which may even be interpreted as success by the caller (if the compiler
performs the truncation as part of its check). This has been observed
in mod_state, where negative values where causing problems with
this_cpu_cmpxchg.

This patch fixes the issue by explicitly casting 8-bit and 16-bit "old"
values using unsigned types in our cmpxchg wrappers. 32-bit types can be
left alone, since the underlying asm makes use of W registers in this
case.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-30 20:16:53 +01:00
..
boot arm64: enable more compressed Image formats 2015-07-27 11:08:39 +01:00
configs arm64: defconfig: Add Ceva ahci to the defconfig 2015-07-06 17:22:59 +01:00
crypto Merge branch 'mvebu/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc 2015-06-19 22:07:07 +08:00
include arm64: cmpxchg: truncate sub-word signed types before comparison 2015-07-30 20:16:53 +01:00
kernel arm64: alternative: put secondary CPUs into polling loop during patch 2015-07-30 19:07:28 +01:00
kvm arm64: kvm: Adopt new alternative assembler macros 2015-07-27 11:08:40 +01:00
lib arm64: atomics: prefetch the destination word for write prior to stxr 2015-07-27 15:28:53 +01:00
mm arm64: mm: mark create_mapping as __init 2015-07-28 11:36:09 +01:00
net arm64: bpf: fix endianness conversion bugs 2015-06-26 14:15:39 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: kconfig: group the v8.1 features together 2015-07-27 15:54:13 +01:00
Kconfig.debug coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
Makefile arm64: atomics: patch in lse instructions when supported by the CPU 2015-07-27 15:28:50 +01:00