Received: by 10.223.185.116 with SMTP id b49csp2884282wrg; Mon, 5 Mar 2018 10:11:33 -0800 (PST) X-Google-Smtp-Source: AG47ELuoZJPHoEIfNjkNIs0Atw1aWukM5VHfHuq4ornPoRAAQ1iba0jS7sj78l8FmIrWPIFBOb0J X-Received: by 10.101.83.194 with SMTP id z2mr12856260pgr.133.1520273493360; Mon, 05 Mar 2018 10:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520273493; cv=none; d=google.com; s=arc-20160816; b=rH2+tlK8IoeW5eOkDOi9/zJnNX7/eT0eunN17FariT4MeyKmWivVvOq4OSpc0czD3X sewA1HdGx992oXa9FMQybCrMwHnl/vJt406WLGSyCHRxnMdXILJ4oX1Kc9AIDGJREY8+ wPM88LkRrHz5DTjffPQGjmXomArbvtX2JX9Bd/jKuev3vOfjAWw3x/WpN1tNnO/SzXGt XPgXnu2M9u2yKc8zKk1uOcEJUSO7tAisidqAvaHFZqwj9CjI2S+5teFimeptBF20rsXT jZUTRZ3cV846+qxF9F9ReKnyK33v65mq7/0XvXpByI050Hend/xDDgkQ6zYwpilQxPWF ILSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:arc-authentication-results; bh=2tjmPUAtA5+EvI0uCXPIGtKpqARlZr+MR583T5o2tD8=; b=Ip1qpd6zY8HSsKz5iHUCxlsyB1qAR0pRLmmk6fjlheXG34b0jbtIkxF6LnJCfJm2zm 8VM9tZKlSKNWBiUofU6OYAuk1rWXu8pCQMfa7uXWUgirFmXOJ+6/XtGXzqc/qUmKdB/h KbqA6LS3pWKbj7oQcJIRA48OxyTvMIl/BUCJuN4yZsXDhOuSBz2b8q18ZBLp0HbLaYso Qm73kRiF7hwk+jxJvew0yQb6mDcR/mqvHSv+6bjBAoRtChLvl2f/FZipuvtBzbVGwejr kF6rpLfaG+uWsSl0Ur94lyAPb+21Enx+YvMmJJmy/MsPtSUB4ma1psp+BvpMmA9B6+Uk Kuhw== ARC-Authentication-Results: i=1; mx.google.com; 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 v204si8633778pgb.212.2018.03.05.10.11.18; Mon, 05 Mar 2018 10:11:33 -0800 (PST) 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; 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 S1752809AbeCESKQ (ORCPT + 99 others); Mon, 5 Mar 2018 13:10:16 -0500 Received: from ale.deltatee.com ([207.54.116.67]:34398 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752096AbeCESKN (ORCPT ); Mon, 5 Mar 2018 13:10:13 -0500 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1esuYl-0001hH-Mn; Mon, 05 Mar 2018 11:10:04 -0700 To: Sinan Kaya , Keith Busch , Oliver Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, "linux-nvdimm@lists.01.org" , linux-block@vger.kernel.org, Jens Axboe , Benjamin Herrenschmidt , Alex Williamson , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Jason Gunthorpe , Bjorn Helgaas , Max Gurtovoy , Christoph Hellwig References: <20180228234006.21093-1-logang@deltatee.com> <20180228234006.21093-8-logang@deltatee.com> <20180305160004.GA30975@localhost.localdomain> <3f56c76d-6a5c-7c2f-5442-c9209749b598@deltatee.com> From: Logan Gunthorpe Message-ID: <645c0d69-8942-5eb5-99ae-04ae385a32fa@deltatee.com> Date: Mon, 5 Mar 2018 11:09:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: hch@lst.de, maxg@mellanox.com, bhelgaas@google.com, jgg@mellanox.com, jglisse@redhat.com, alex.williamson@redhat.com, benh@kernel.crashing.org, axboe@kernel.dk, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, oohall@gmail.com, keith.busch@intel.com, okaya@codeaurora.org X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-7.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,LR_URI_NUMERIC_ENDING,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v2 07/10] nvme-pci: Use PCI p2pmem subsystem to manage the CMB X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/03/18 11:02 AM, Sinan Kaya wrote: > writel has a barrier inside on ARM64. > > https://elixir.bootlin.com/linux/latest/source/arch/arm64/include/asm/io.h#L143 Yes, and no barrier inside memcpy_toio as it uses __raw_writes. This should be sufficient as we are only accessing addresses that look like memory and have no side effects (those enabling doorbell accesses may need to worry about this though). Typically, what could happen, in this case, is the CPU would issue writes to the BAR normally and the next time it programmed the DMA engine it would flush everything via the flush in writel. > Why do you need another barrier? We don't. Thanks, Logan