Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2625473pxj; Mon, 31 May 2021 06:51:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxftmWbZrjsMcqNQPqtJQ1j0Oh4VJ0fYWzu7HqLEl+DrLkHalM3SMKY5MtawehBWyfyGnFM X-Received: by 2002:a17:906:3395:: with SMTP id v21mr3602091eja.102.1622469117061; Mon, 31 May 2021 06:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622469117; cv=none; d=google.com; s=arc-20160816; b=d9MQzEmxAyoUyEqr1e8asq+2pgyo7MhKvWEObMl8dVRIJ6XIvR6IfN1o1cVR8lNP8Q 1g/Nn2EZwQIo8PAUxgxykeDZba45rFdClHWjka65q80j58aOqUUAJqzFdhuBPTjNIObX emulD2zTE8dcZK1sIJnhxGL9UBzipKyDEHfUgvX8erB1/bpeJlCLbixEBzfK1DsKRXg0 nl8JsFTos0IRz0NDPTTE5xY2puDTAVaHypRIVXp6nJyeDxSgse0/5FkEG0fT2tvnb003 f9QxwJRwAZLbX+nAyz/QLaAPnCXrXGuWiSFKDRXeemNONgB5moae5+vm3YxA/vRFt9Q/ RRHg== 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=rv5oNyAolfKFuQqGupDXWzTomeme4SLIbqFKRoYdppzu/4t5HywysYwGzyzxafx8oP 3ZLs059L1DbPGRdDZ8KBcZ1XO12xCysevbO49YTBJexW7rtfxRwZPsTIZTJxpWQ2hipN zXZD4p/QXm12NDDeE9MwD4jj6iZWh1YrCE2VpPCZgucKZPDDzkY0WHC0EhnqmwQS/kDI 76j2O5o16IuhsaMHwkCimD9rXpyY/LAYOK+gh7g43k5if7oXK8zbxwrRW9HWbWXOvQbw T9VLp2L6fNfwI1g3d3TGM8TUFkiLEknlR08tCutXRw60NQ0W5ge2yERSsTvDOWaJ75SB iZZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ktSBQkRx; 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 s14si12825010edd.602.2021.05.31.06.51.34; Mon, 31 May 2021 06:51:57 -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=ktSBQkRx; 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 S233096AbhEaNty (ORCPT + 99 others); Mon, 31 May 2021 09:49:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:40248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbhEaNeY (ORCPT ); Mon, 31 May 2021 09:34:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 13A3A61400; Mon, 31 May 2021 13:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467499; bh=eThF42QgHM2ceyuUbfHXSeQsf1W1pocY7rix57lF/sE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ktSBQkRxKPSoTABscIdKP+s+V/wCIBoe6YhhcsHjsO3adHXxuzGJcxXzWTwJC5VHI 2ZVWxymnrNbzxRKwBa67uCN330NGrMmJol+oMPC+bWGe0E6FThar+uEIGBIy0tvVP2 uy5bhjzjx7gHG2NSPjqgCnTenLj3JCBYChzRGroE= 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 4.19 088/116] openrisc: Define memory barrier mb Date: Mon, 31 May 2021 15:14:24 +0200 Message-Id: <20210531130643.128560431@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130640.131924542@linuxfoundation.org> References: <20210531130640.131924542@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