Received: by 10.213.65.68 with SMTP id h4csp93116imn; Thu, 5 Apr 2018 18:36:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx48bInlf1yqwimKAnQxfQ13rxtgeJaKmZbXkdrxrjYzN4/xZNnvCYOJ3BE9UNWrQ9rQOauIt X-Received: by 2002:a17:902:6a83:: with SMTP id n3-v6mr24552370plk.323.1522978609422; Thu, 05 Apr 2018 18:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522978609; cv=none; d=google.com; s=arc-20160816; b=I32DT5oW9Ur56zlkZ3+t5SUMlvxErwCSKBrd1y7sAb9KKgssj9upykb7eyqsiKw2M+ Jtfn9WrAfCVcZj53POiUoRlUFskAOaKmU4M3uFHhSuAVBUYGKwZ92TN+mWEgUhaIngwg iriwURqxr03nSkWX4M7Gvpbsi7jCPsT8KA2Uxg33nulDBHERZgJHc8k9LbtV8VGeWvkR AA52k6we5muQjau7eEa6N78BebzSPB/p2H0sH9IGojPciu9BIKV0ddry9J4X1I7ClY3L BoPrp+/SCyPz98fVSPd43ht1LxmWznJbma8+rNa4b2e6C1ABRsg2GrKxcYNG6uVP2GJy 9a/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=ldJdrFO/KWiaEOXJmT/i0xWDC09X5wLR12X70bfztdI=; b=oASRXcj34piy3i1dqXRPdamFtiQhQ81v96Aowl6psL0v1tluPYDOlLQBk8Xl00EFb7 hCufMPKLfg3CCWohtgrg6hyAKvHJj7mDE3MZg0hbZoyHxQaGtYpE40tgRwaa0KSWw3ZJ CxXqlrpglnOEaXUMaU3t4zoTcbYnvgvF9TfRDl2Rj6KB+S3sicdzRlmEXGPwdv6NzuHT /KPW2/XNgm3vIg83w9Lb5Sppdf5o7D9tBB9eAPGiJMK2QGoGqkI9NdIdlYsn8vs8Uzul 6ibVk96EKD6R3IGWCtpTwnfRGCdrCIkHMnk+3TZbk0w8lvpZVsdIwVUhCTFGKJdunOZf wTfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=iWdOw430; dkim=pass header.i=@codeaurora.org header.s=default header.b=KOy+Ewge; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si6957226plb.349.2018.04.05.18.36.35; Thu, 05 Apr 2018 18:36:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=iWdOw430; dkim=pass header.i=@codeaurora.org header.s=default header.b=KOy+Ewge; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751483AbeDFBei (ORCPT + 99 others); Thu, 5 Apr 2018 21:34:38 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58590 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeDFBef (ORCPT ); Thu, 5 Apr 2018 21:34:35 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BBE346090E; Fri, 6 Apr 2018 01:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522978474; bh=34v6SXWpP8Vzfv7iQcsdoIDgGYEUWjUInnSMnkoV26w=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=iWdOw430WazP1Set4sfbNgX1jgTTj7OvQCxQmpN4yGVlXYOkrMQmPQ+XMBonSmwFY NbccUnwyJOX7R/CMzOqGdB8Hvg/Zg54Ks5jPMULHOwN7yB8pd+93UHepOJwtWlLaec I0wrmFq1y/x3fS0QVTPT1Lcxk7ZLSKc/0GfRnXoc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.0.105] (cpe-174-109-247-98.nc.res.rr.com [174.109.247.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B79DA60274; Fri, 6 Apr 2018 01:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522978473; bh=34v6SXWpP8Vzfv7iQcsdoIDgGYEUWjUInnSMnkoV26w=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=KOy+EwgeXu0X83sPVFmcur52Ybfs9rjEfEw5I0I+oEAfGLJf9GX8lOSvuqWXJsCxZ +qjKl9E+mGprTaetmUiNVFbKAlSILNnh+qLQWucJzxKiurx9ucIz6AlgPIhVf19Fsh SJT5rR1tdUEwp5tpg7WfKmW9BpuNA8j/gBs0+Tqw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B79DA60274 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 Subject: Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX() To: linux-mips@linux-mips.org, arnd@arndb.de, timur@codeaurora.org, sulrich@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ralf Baechle , James Hogan , Paul Burton , linux-kernel@vger.kernel.org References: <1522760109-16497-1-git-send-email-okaya@codeaurora.org> <1522760109-16497-2-git-send-email-okaya@codeaurora.org> From: Sinan Kaya Message-ID: <41e184ae-689e-93c9-7b15-0c68bd624130@codeaurora.org> Date: Thu, 5 Apr 2018 21:34:31 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1522760109-16497-2-git-send-email-okaya@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/3/2018 8:55 AM, Sinan Kaya wrote: > 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 memory accesses following readX() to observe > stale data. > > Signed-off-by: Sinan Kaya > Reported-by: Arnd Bergmann > --- > arch/mips/include/asm/io.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h > index fd00ddaf..6ac502f 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(); \ > } \ > \ > + rmb(); \ > return pfx##ioswab##bwlq(__mem, __val); \ > } > > Can we get these merged to 4.17? There was a consensus to fix the architectures having API violation issues. https://www.mail-archive.com/netdev@vger.kernel.org/msg225971.html -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.