android_kernel_oneplus_msm8998/arch
John David Anglin 277b161b1a parisc: Define mb() and add memory barriers to assembler unlock sequences
commit fedb8da96355f5f64353625bf96dc69423ad1826 upstream.

For years I thought all parisc machines executed loads and stores in
order. However, Jeff Law recently indicated on gcc-patches that this is
not correct. There are various degrees of out-of-order execution all the
way back to the PA7xxx processor series (hit-under-miss). The PA8xxx
series has full out-of-order execution for both integer operations, and
loads and stores.

This is described in the following article:
http://web.archive.org/web/20040214092531/http://www.cpus.hp.com/technical_references/advperf.shtml

For this reason, we need to define mb() and to insert a memory barrier
before the store unlocking spinlocks. This ensures that all memory
accesses are complete prior to unlocking. The ldcw instruction performs
the same function on entry.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-15 17:42:05 +02:00
..
alpha locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs 2018-05-30 07:49:01 +02:00
arc ARC: mm: allow mprotect to make stack mappings executable 2018-07-25 10:18:16 +02:00
arm ARM: fix put_user() for gcc-8 2018-07-28 07:45:05 +02:00
arm64 arm64: lse: Add early clobbers to some input/output asm operands 2018-06-06 16:46:20 +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 futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
h8300 h8300/ptrace: Fix incorrect register transfer count 2017-03-31 09:49:53 +02:00
hexagon futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
ia64 futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
m32r m32r: fix __get_user() 2016-09-24 10:07:43 +02:00
m68k m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap() 2018-07-03 11:21:26 +02:00
metag metag/uaccess: Check access_ok in strncpy_from_user 2017-05-25 14:30:16 +02:00
microblaze microblaze: Fix simpleImage format generation 2018-08-06 16:24:39 +02:00
mips MIPS: Fix off-by-one in pci_resource_to_user() 2018-08-06 16:24:29 +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: Define mb() and add memory barriers to assembler unlock sequences 2018-08-15 17:42:05 +02:00
powerpc powerpc/embedded6xx/hlwd-pic: Prevent interrupts from being handled by Starlet 2018-08-06 16:24:35 +02:00
s390 perf: fix invalid bit in diagnostic entry 2018-08-06 16:24:37 +02:00
score score: fix copy_from_user() and friends 2016-09-24 10:07:44 +02:00
sh sh: New gcc support 2018-06-06 16:46:20 +02:00
sparc sparc64: Fix build warnings with gcc 7. 2018-06-06 16:46:23 +02:00
tile futex: Remove duplicated code and fix undefined behaviour 2018-05-26 08:48:50 +02:00
um um: Use POSIX ucontext_t instead of struct ucontext 2018-04-24 09:32:08 +02:00
unicore32
x86 kvm: x86: vmx: fix vpid leak 2018-08-06 16:24:42 +02:00
xtensa signal/xtensa: Consistenly use SIGBUS in do_unaligned_user 2018-07-03 11:21:26 +02:00
.gitignore
Kconfig