Received: by 10.192.165.156 with SMTP id m28csp102624imm; Thu, 12 Apr 2018 17:33:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx49JOd7rqLEgj8YmGb5tZzc3GKrJLvmIGJTpKCWCZNbAK5lcim7yWAikY9YXIEjBKCVonFIW X-Received: by 2002:a17:902:6046:: with SMTP id a6-v6mr768586plt.138.1523579591579; Thu, 12 Apr 2018 17:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523579591; cv=none; d=google.com; s=arc-20160816; b=TKY2iLWlQNs5sYCuODqGMkNc3UPdtG0YMd4Vjw390ovxAloW40lZ9g+dl/CfBxlV7c FZOoJTWVxhtoeUME0DoBU6EkXbP+h4moM2d22vqJAr/RuGSSL4SIiQkXSFAqcnXKRVKF Pc7uptHmF5fQ5+UN7bOjzMl0MMvLZ1EahPd8SNOqLxDE8vykyqbYV1qVcQuIjfSuNs+Q LSmFU047nntJs2fm9Z1LyVgUP1OyxdjtkEdzLyanYtJ0j88ETiWMi5MqFwDa2TfhG+va CQ68p5QGuUyHq94SaGCe8CthhyZ2GhUvTDzQ5U6su/GFfFTXO1kvhF/7eredmcif4i/E o5fA== 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=Zks74AWY76I/XwUMfDTUWpQ+Kn0N/uAcpQGKROsKj/0=; b=WOwQ2oE25eRu9/oO45FJDm+OpImRbrNxpSriCLF46gAtdbyRYCf/sScHgkFKG1X9XV v5J1rOm5v0yalaa14UDXZMUD6Y9Ltc7K1xIkHnhA3X/bIk7QVPEKOcR+QQcIYpyjJCCn ODS7BYmrCIHehQOX9FPThPFT5LIPxdRUMoHARNI9xU2E+2lHp2s9IZjnj2qHUBIs7H0B BjXmh4bT4b2uyOPl5ATHPcBTqaKI3ZLNMwwlJggVBW3FPcTTdm3KSAF0+4S8tssKWHCY A1oHrsLN3CeHXI9TYdPiAaoJbCNb2EW+ZRvwV5Wu9bD2ljb+IkFD3sMKuaDMh4IwzSk3 gCsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=C/g7/WIM; dkim=pass header.i=@codeaurora.org header.s=default header.b=nykPcnD4; 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 q66si3467812pfk.190.2018.04.12.17.32.16; Thu, 12 Apr 2018 17:33:11 -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=C/g7/WIM; dkim=pass header.i=@codeaurora.org header.s=default header.b=nykPcnD4; 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 S1753166AbeDLWio (ORCPT + 99 others); Thu, 12 Apr 2018 18:38:44 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52492 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753008AbeDLWin (ORCPT ); Thu, 12 Apr 2018 18:38:43 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 84E7960F91; Thu, 12 Apr 2018 22:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523572722; bh=I318nWpUI17AdKyMOjpJrAwJ3nFcOW7z/O/wD4KzMuI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=C/g7/WIMWG3k0rAe7SfhEXGjuN0Ra25MDQNetLmVy93OjukmRoE5aX0vyekrHE/Zh rbA4aGmMnBWG+hhFC9MOHlBMZ44JXJLwfHmjBKAydY6XkRduHm4u+NzFZW5jCtKyz4 frqztzpqMo1ICxJ/Mjvfhq4c08c/1id+U+gkcWio= 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 [10.235.228.150] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (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 A795B60264; Thu, 12 Apr 2018 22:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523572721; bh=I318nWpUI17AdKyMOjpJrAwJ3nFcOW7z/O/wD4KzMuI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=nykPcnD4MHgDHMV3CHrjxWgl1lOTSV2dZeZdwhCkKhq9qsHNDomuLCmRpqpPEBAl/ fsRnBeXqj1+NDImuaqJSS11ZXWFKoV1YKaLS5dyIBxRt63onwho8VDit5nxSwd3hzB 2YLL0krClf8Es6qMooCeZzavlbMBZyhj2dUndX74= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A795B60264 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: James Hogan Cc: linux-mips@linux-mips.org, arnd@arndb.de, timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ralf Baechle , 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> <20180412215149.GA27802@saruman> <20180412215855.GB27802@saruman> From: Sinan Kaya Message-ID: <33c9c074-e0a5-7552-9993-269cd85101aa@codeaurora.org> Date: Thu, 12 Apr 2018 18:38:39 -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: <20180412215855.GB27802@saruman> 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/12/2018 5:58 PM, James Hogan wrote: > On Thu, Apr 12, 2018 at 10:51:49PM +0100, James Hogan wrote: >> On Tue, Apr 03, 2018 at 08:55:04AM -0400, 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 >> >> Both patches look like obvious improvements to me, so I'm happy to apply >> to my fixes branch. > > Though having said that, a comment to go with the rmb() (as suggested by > checkpatch) to detail the situation we're concerned about would be nice > to have. I can send a new version. No worries. Functional correctness is more important at this moment. I can accommodate any nice to haves. > > Cheers > James > -- 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.