openrisc: Define memory barrier mb
authorPeter Zijlstra <peterz@infradead.org>
Wed, 14 Apr 2021 12:45:43 +0000 (14:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 06:36:22 +0000 (08:36 +0200)
commitf1cff517d188485b93af2921c37c270df5c7da6d
tree46c02744315124c5cd0b728aae823337e39b6022
parent830c805c5b8ccc86c264d1e71c384bd83baa5ea7
openrisc: Define memory barrier mb

[ Upstream commit 8b549c18ae81dbc36fb11e4aa08b8378c599ca95 ]

This came up in the discussion of the requirements of qspinlock on an
architecture.  OpenRISC uses qspinlock, but it was noticed that the
memmory barrier was not defined.

Peter defined it in the mail thread writing:

    As near as I can tell this should do. The arch spec only lists
    this one instruction and the text makes it sound like a completion
    barrier.

This is correct so applying this patch.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
[shorne@gmail.com:Turned the mail into a patch]
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/openrisc/include/asm/barrier.h [new file with mode: 0644]