linux/arch/arc
Vineet Gupta d57f727264 ARC: add compiler barrier to LLSC based cmpxchg
When auditing cmpxchg call sites, Chuck noted that gcc was optimizing
away some of the desired LDs.

|	do {
|		new = old = *ipi_data_ptr;
|		new |= 1U << msg;
|	} while (cmpxchg(ipi_data_ptr, old, new) != old);

was generating to below

| 8015cef8:	ld         r2,[r4,0]  <-- First LD
| 8015cefc:	bset       r1,r2,r1
|
| 8015cf00:	llock      r3,[r4]  <-- atomic op
| 8015cf04:	brne       r3,r2,8015cf10
| 8015cf08:	scond      r1,[r4]
| 8015cf0c:	bnz        8015cf00
|
| 8015cf10:	brne       r3,r2,8015cf00  <-- Branch doesn't go to orig LD

Although this was fixed by adding a ACCESS_ONCE in this call site, it
seems safer (for now at least) to add compiler barrier to LLSC based
cmpxchg

Reported-by: Chuck Jordan <cjordan@synopsys,com>
Cc: <stable@vger.kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-06-25 05:59:23 +05:30
..
boot ARC: [axs101] STAR 9000799830: Fix SD cards support 2015-06-19 18:09:31 +05:30
configs ARC: [axs101] Add support for AXS101 SDP (software development platform) 2015-06-19 18:09:30 +05:30
include ARC: add compiler barrier to LLSC based cmpxchg 2015-06-25 05:59:23 +05:30
kernel ARCv2: SMP: intc: IDU 2nd level intc for dynamic IRQ distribution 2015-06-22 14:06:57 +05:30
lib ARCv2: Adhere to Zero Delay loop restriction 2015-06-22 14:06:56 +05:30
mm ARCv2: MMUv4: support aliasing icache config 2015-06-22 14:06:56 +05:30
oprofile ARC: OProfile support 2013-02-15 23:16:00 +05:30
plat-axs10x ARC: [axs101] Add missing __init annotations 2015-06-19 18:09:32 +05:30
plat-sim ARCv2: SMP: Support ARConnect (MCIP) for Inter-Core-Interrupts et al 2015-06-22 14:06:56 +05:30
plat-tb10x ARC: [plat*] move code out of .init_machine into common 2014-10-13 14:46:13 +05:30
Kbuild
Kconfig ARCv2: SMP: clocksource: Enable Global Real Time counter 2015-06-22 14:06:57 +05:30
Kconfig.debug ARC: With earlycon in use, retire EARLY_PRINTK 2015-05-11 11:20:21 +05:30
Makefile ARCv2: Support for ARCv2 ISA and HS38x cores 2015-06-22 14:06:55 +05:30