Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2637847pxj; Mon, 31 May 2021 07:07:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrwYhgh1JefRsWZA5rirJVxRQI/kFr/r8BFq7YdK21Z9yy7H2XR9YBcwMCQcJnP7t5uxvv X-Received: by 2002:a05:6602:1494:: with SMTP id a20mr17404242iow.100.1622470065172; Mon, 31 May 2021 07:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622470065; cv=none; d=google.com; s=arc-20160816; b=dpH8G5eQbNOrEjhoPzjmscSTvX+fMt4ywAwwVzxMPrHr3tf5czcQmYtSqYvHi7yGXw B39R/EyjA+d9UKiiSUDqebVFoRfFgnpJCcajATVwZ9DKqZ+Ir32tUWke5Q3tE4b59qQs EGJPRW/7xCiDZE+er0F0dKFR7EENwARt1d+Ydd0u9fo/RJGPkr7fyxRoGiIYqRvMPYJ7 tK9fKFoRjbX8cqs1VJJoWw1FbAlTPX527UQlIlux37+gE/2mXFeSt00yOS33/ABxkJoU gXxExr1zFHwKHfcBvfqsVt/JpRXQyipOUaA41n/4jRSSQwYzFzgN7BlM56RIs7sXHrfG AaXA== 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=e4sxxL2Alkpd9kss4iFuVcga4zZzVNXaXxEdibAcbyCXErzfpO8XPPTNwz89MX6smx 5sjdFv3bREIsFqxg8nMwJ5acl9XeEqutM5CQ4W4TdWgYgQg8kFNnJgahFpWLL93GvAnu 2w8S2QUV+zGryZNT4+KN9G6PpZn10iveGj6UKOvlrMxWV6QI+4kIfXpwlXwbsUk0vxby X3vGA1Zz6Loc9y6+TbRFDa0kjyLXUTb+BufABv7k+zpxtZ1J3SZiWRp6d3pV++Lic0dt kOrYWI9E6aC26p/tMBvhS5vxusQEuoLyA/J5syW6NOX3CVyGApJhcup0P0GTQnF/OzRs OjPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hGkcCl6H; 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 s6si607313iln.106.2021.05.31.07.07.32; Mon, 31 May 2021 07:07:45 -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=hGkcCl6H; 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 S233152AbhEaOIe (ORCPT + 99 others); Mon, 31 May 2021 10:08:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:49632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232182AbhEaNnF (ORCPT ); Mon, 31 May 2021 09:43:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 642E361490; Mon, 31 May 2021 13:28:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467727; bh=eThF42QgHM2ceyuUbfHXSeQsf1W1pocY7rix57lF/sE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hGkcCl6HXonP6E6TK7abKk/wO+fXHVnWIDmD3dxDmQbt9GRrROLvAkZDeC9cf9GtK DJf4pJPeE9Mmh6cjPlUdWC5/gD4U8YGAlyfy46h1f4+zccc6nfz51LIwOj9qApotLU 5vf/bll0o147wQ50g39yP7dVChbRrSNRjNkooGek= 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.14 57/79] openrisc: Define memory barrier mb Date: Mon, 31 May 2021 15:14:42 +0200 Message-Id: <20210531130637.826860384@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130636.002722319@linuxfoundation.org> References: <20210531130636.002722319@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