Message ID | 1522692633-24304-1-git-send-email-okaya@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C70160375 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Apr 2018 18:11:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDAE328A44 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Apr 2018 18:11:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF06C28A4C; Mon, 2 Apr 2018 18:11:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 680D228A44 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Apr 2018 18:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SrFidooI7dgi8DBu/EkiEnf6f2EUvjC8YYIXdncjVig=; b=fcYz3mGW7mmsK/ IGZkLFMUAJKB4w3XcWm7G2oQ4KqOFPQDmLRS5+YZlSWQa8ogpcnZUlFo88fy8FEVJKwld2g49WuiL abYN/44y3R93VuankzqW+XBnxfavWZwL8VH3LfaZunyizR4DDYskbX1kOm9Me6KikLII6LPq7AXFh +ExgKD/2c5cBLWA3iP0u/qEyXd0tnuE8/dho8Wcvb5rgIoDmlA9NwyXLJGNkgHjIWO/D6PCOvj4lo k1EtPUuHuEWkZMCjFhr8FfF81QJFu8a56IRcjk9iNQi7oKVFAIJM1b1MttJ+5kn8O6ehw7xTHfZhV sbrgKCYIwYD8i+FGZiKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f33v2-0002CA-8I; Mon, 02 Apr 2018 18:11:00 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f33uz-0002AM-0k for linux-arm-kernel@lists.infradead.org; Mon, 02 Apr 2018 18:10:58 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8272C607E5; Mon, 2 Apr 2018 18:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522692646; bh=B62/sFeRiDwOYW5ZX08hlViVI1q7DO+Kcxpop8wMsLM=; h=From:To:Cc:Subject:Date:From; b=S10APZ6OE8JPyMJOmA7DWTYVvDSLe40yqb9LBZxtf6rap+JnpWkuPwGgkkAdAqkzX 2qk0XNXdH3mPK/SW3XcKXbpmnqR1vePKCEiZYhsXDuXfBWO/32n7IbywQl8RPyVQ9c ifSBFQsz8mgRCuCyJdJ3Rw6KCqMkBqvO26dFKtF4= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 11AED60591; Mon, 2 Apr 2018 18:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522692646; bh=B62/sFeRiDwOYW5ZX08hlViVI1q7DO+Kcxpop8wMsLM=; h=From:To:Cc:Subject:Date:From; b=S10APZ6OE8JPyMJOmA7DWTYVvDSLe40yqb9LBZxtf6rap+JnpWkuPwGgkkAdAqkzX 2qk0XNXdH3mPK/SW3XcKXbpmnqR1vePKCEiZYhsXDuXfBWO/32n7IbywQl8RPyVQ9c ifSBFQsz8mgRCuCyJdJ3Rw6KCqMkBqvO26dFKtF4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 11AED60591 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya <okaya@codeaurora.org> To: linux-mips@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org Subject: [PATCH] MIPS: io: add a barrier after readX() Date: Mon, 2 Apr 2018 14:10:32 -0400 Message-Id: <1522692633-24304-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180402_111057_097158_BFDEF295 X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-mips@linux-mips.org, arnd@arndb.de, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>, Sinan Kaya <okaya@codeaurora.org>, Paul Burton <paul.burton@mips.com>, James Hogan <jhogan@kernel.org>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 0cbf3af..7f9068d 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -377,6 +377,7 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ BUG(); \ } \ \ + war_io_reorder_wmb(); \ return pfx##ioswab##bwlq(__mem, __val); \ }
While a barrier is present in writeX() function before the register write, a similar barrier is missing in the readX() function after the register read. This could allow register accesses following readX() to observe stale data. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Reported-by: Arnd Bergmann <arnd@arndb.de> --- arch/mips/include/asm/io.h | 1 + 1 file changed, 1 insertion(+)