Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp492770imm; Tue, 31 Jul 2018 23:43:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfOa3V+RDb5CKfmceT5grkBUkyaKcUudiD4QAuIfF2pL1Jx3bZIcg4bdD9kLrdrVleH0m1n X-Received: by 2002:a63:195e:: with SMTP id 30-v6mr23124291pgz.192.1533105798210; Tue, 31 Jul 2018 23:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533105798; cv=none; d=google.com; s=arc-20160816; b=j43r5nPPX2hT98A+HLtyavt2Dd+Nf9h5AE1VlRnhqqWGa5kudFzEPQwfmDsAbg7eGL K0ONd1PGUwjaObfSb8fBiEveLS7Y/VQEmOV0GZc/xYdhSHq9Bt1p6nwBunKtOR4cKE9E QwMIrtxSHZX57Wor4NAJpEwSpa8AiD1n9QQoyv4vHFwUgJxtKIyGnMZRbh8wzOjZLoxt C6ryF4UgjWmqZltejOTuCcWm3onL/JxUPIMRVNQEeRPk0mmiYF98UcmhuxHpMi/1AsZW FCzJhVsKcPZGshipZT9TpAuTvqod7pR2pTnbvc3/zWgAdGAVU9wMov9I2uQAaHmJ8KZA 2NPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=/sm+K3LgnGgpSYuh9jtprA6zYZdDr0Mda5ee1hRzn0o=; b=f5KigXC515469z34umZpDl4o9B8h1r9Q1HYCh41TsZ5H8PLyGKRkHV7Om1S5sMMGUW iFS/9F4il+NKLFGaxRCqFWlE7sHYy2Vk0OScLWs5mDdC5d4GSZY8hEghJKFSbQwRwghU Yy8qZvAnDfsG+7dRnlvoxiGPbNBp3pxpw/uULQsKYxTt6nWeuZj1Q+8/WrKzUUitI2mQ HoJnno48yIiYKNQgHE92sDy607JgANdThk9IVlQmlvHN4GGnMtkpiMVUV9ilPKrAFzl5 xwIsM30ExqKVeCbXRQmPkhjJVpT1AstIMoxALBlHHWdnvGr4fH9xJM+BVJcjiS6TrnJ1 b5QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=URDZ5F2J; dkim=pass header.i=@codeaurora.org header.s=default header.b=Ig7Wr69h; 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 q8-v6si16491133pgh.675.2018.07.31.23.43.03; Tue, 31 Jul 2018 23:43:18 -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=URDZ5F2J; dkim=pass header.i=@codeaurora.org header.s=default header.b=Ig7Wr69h; 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 S2387528AbeHAIZc (ORCPT + 99 others); Wed, 1 Aug 2018 04:25:32 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43680 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387444AbeHAIZc (ORCPT ); Wed, 1 Aug 2018 04:25:32 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2EB066074D; Wed, 1 Aug 2018 06:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533105684; bh=xMFo6AgokAB14p/2jESTRLOwum26/eCoUeRxe/4S3ao=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=URDZ5F2J4xqgyUaqF6dEcA97vME8H2x8k50lxAQd1QNJc9ftJkne5qu+TgUWSD2i7 NdHUM/irKaq4vJKjv4WlcWrrBAAcgKL5fiE9x/F0sWiwwvbqDVuf7Bv8VWL0L55au4 VMcgxjAebOk5zJFIAYEOFHHIiqQDqt2ZrTda0APk= 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 mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 7A82460275; Wed, 1 Aug 2018 06:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1533105683; bh=xMFo6AgokAB14p/2jESTRLOwum26/eCoUeRxe/4S3ao=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ig7Wr69hrXIMK4G+/UzdMDNV7uNbB9EiB59TsJF5OzaOw5uX7ViMhRy5s6IlS2P1W Nn8mgqFLvBEsB+lkGS3ze/ASXqxA/b0R7J0XosmfpDFIpTdJm+bsVoKKm5beKpAEuy hpiWZO8oV9Kv/W6PeO5sQoAjDuFcQyYe6pQgFQrY= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 31 Jul 2018 23:41:23 -0700 From: okaya@codeaurora.org To: Christoph Hellwig Cc: Tony Luck , Fenghua Yu , Arnd Bergmann , linux-ia64@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, okaya@kernel.org Subject: Re: [PATCH] ia64: fix barrier placement for write* / dma mapping In-Reply-To: <20180731172031.4447-2-hch@lst.de> References: <20180731172031.4447-1-hch@lst.de> <20180731172031.4447-2-hch@lst.de> Message-ID: X-Sender: okaya@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + my new email On 2018-07-31 10:20, Christoph Hellwig wrote: > memory-barriers.txt has been updated with the following requirement. > > "When using writel(), a prior wmb() is not needed to guarantee that the > cache coherent memory writes have completed before writing to the MMIO > region." > > The current writeX() and iowriteX() implementations on ia64 are not > satisfying this requirement as the barrier is after the register write. > I asked this question to Tony Luck before. If I remember right, his answer was: CPU guarantees outstanding writes to be flushed when a register write instruction is executed and an additional barrier instruction is not needed. > This adds the missing memory barriers, and instead drops them from the > dma sync routine where they are misplaced (and were missing in the > more important map/unmap cases anyway). > > All this doesn't affect the SN2 platform, which already has barrier > in the I/O accessors, and none in dma mapping (but then again > swiotlb doesn't have any either). > > Signed-off-by: Christoph Hellwig > ---