Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2669115pxj; Mon, 31 May 2021 07:52:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy9l1fau0cCXDIuBAWU6zdom8dNuBeeXP91PkLQMA9cWnAoiUhVlMit+FrtgSVi1D5BSgL X-Received: by 2002:a5d:94d5:: with SMTP id y21mr17420449ior.110.1622472721543; Mon, 31 May 2021 07:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622472721; cv=none; d=google.com; s=arc-20160816; b=YxG66Vt0SBx5VGnTAW6XeL/LfmKlVJwuTsi8Lajh/s7Se4DWkTG7oN264i5Xme52bX ohUHSK76c4fZWXKaU/2fgePiYpvSsV3v6d0UJIY3V9d4Jqo5Mpj8d2/c+R9GakL3UGTI kDqSw3cxVluWp6hm/nNUWs4oAZZu1+tWl2YeH1/skh6hZTnG0g9Cx9qwLyqQIq6XllZ1 6O7K3Ts9aNXxyyrXqJ0C1D2c59uRMgQOAzaehFp0QaCVrSvnKsW2UKgJt+FwsMKRbc0k R52F+h0vgILnBmLCr+aP2je2UrLcwocgt0U/P+0uKA7DJkHV3INdlUn7WQxEugG8qY2a CrvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DTcRl4SBoEJXZ0M9tEbg9q0OXGey1116eVSiddy/Iio=; b=SswPXx2ZkDOhT/ooJoWRr/+HErA4SxDDLw0VJcuCwoA7plsBEg9/sXt10cNFGXTyeD iUKvbdCWcrF4mrMIiO4wECJ0/+ASEDz/gPzfiGzA6lD1VfTIlm8DAHxE1NzMusnemUWZ 7j0rrtFgjwYRWAnA9vgrTeJANF68JJw3CWa2KZB46E2mXxrY9cyE4dlvBk9Wf2mFBjkT 7/wSTkPAxV7sfwNGsHzgstAyDb0hWbh6rdDGs0ii9E3e2O2vz1dGYTCjiF054chucjuZ +Q+jMV9IS+/gPLNCLIsi0JL6yH5NDd1OkuCs8aNnD97ZDLQstSL4NZ21LJT5QJkpqjw1 qBFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N7+7l8Fz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f184si13900233jac.102.2021.05.31.07.51.48; Mon, 31 May 2021 07:52:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=N7+7l8Fz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233787AbhEaOxA (ORCPT + 99 others); Mon, 31 May 2021 10:53:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:36536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233147AbhEaOC7 (ORCPT ); Mon, 31 May 2021 10:02:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9A5C4613FF; Mon, 31 May 2021 13:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468251; bh=eThF42QgHM2ceyuUbfHXSeQsf1W1pocY7rix57lF/sE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N7+7l8FzR6FrlJZ7ZFAd0n44QTVxtiTClZC+19QfAC3xfaTxMJVGabr1cTD6nr/W5 aEuSYQEf9+bhP61WoYZexqSB29i/l/m0kztz7JdUr8NZQX/AHU0kyIfQKBGBf7MEl0 W5lBopEj6s4+GYFlTjQULTcSjpGuxFxRUOynQdKM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Zijlstra , Stafford Horne , Sasha Levin Subject: [PATCH 5.10 173/252] openrisc: Define memory barrier mb Date: Mon, 31 May 2021 15:13:58 +0200 Message-Id: <20210531130703.887278106@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra [ 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 [shorne@gmail.com:Turned the mail into a patch] Signed-off-by: Stafford Horne Signed-off-by: Sasha Levin --- arch/openrisc/include/asm/barrier.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 arch/openrisc/include/asm/barrier.h diff --git a/arch/openrisc/include/asm/barrier.h b/arch/openrisc/include/asm/barrier.h new file mode 100644 index 000000000000..7538294721be --- /dev/null +++ b/arch/openrisc/include/asm/barrier.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_BARRIER_H +#define __ASM_BARRIER_H + +#define mb() asm volatile ("l.msync" ::: "memory") + +#include + +#endif /* __ASM_BARRIER_H */ -- 2.30.2