parisc: Remove unnecessary barriers from spinlock.h
authorJohn David Anglin <dave.anglin@bell.net>
Sun, 12 Aug 2018 20:31:17 +0000 (16:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:09:22 +0000 (13:09 +0200)
commit6541d98d114ef4ccf923c02ae665262450b3966c
tree8a5f24875aef1c6d8352120f82e008049456a9d3
parent3f59cf41fbfb622878c53815b9f464fe5aeaf7d9
parisc: Remove unnecessary barriers from spinlock.h

commit 3b885ac1dc35b87a39ee176a6c7e2af9c789d8b8 upstream.

Now that mb() is an instruction barrier, it will slow performance if we issue
unnecessary barriers.

The spinlock defines have a number of unnecessary barriers.  The __ldcw()
define is both a hardware and compiler barrier.  The mb() barriers in the
routines using __ldcw() serve no purpose.

The only barrier needed is the one in arch_spin_unlock().  We need to ensure
all accesses are complete prior to releasing the lock.

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>
arch/parisc/include/asm/spinlock.h