Received: by 10.213.65.68 with SMTP id h4csp1838969imn; Thu, 5 Apr 2018 04:50:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+DmzsY6GbmX+XstmRHjrZKuxAK1qbaLwyDNWkzfHwCVrOF71YUS5zHA16GyzYmjcflSJBM X-Received: by 10.98.189.14 with SMTP id a14mr10363546pff.30.1522929007997; Thu, 05 Apr 2018 04:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522929007; cv=none; d=google.com; s=arc-20160816; b=IR86iD7fYf35q4ysbc2Dw4fU7BcmBKUuGPwQVHOcS0LakvRA6RiASSaOtW6cErQpOB lFSwJlQo+yt4+K53aeypp6xG7gAqBtNLerZnMDOv3FL6tgGfRfRxld/mPsdTVFvwpDIJ OxNnkIcs/SqwEanaWZbZNRHRqnIfexxW2guxK3lY4y1IL4TOymbF4FT2qzdeK61V6KzQ GYuscaPW7pScawMOrO99fDiq+S/yQGIoqsShayuh5e7gwn9QirB4Xcd/7Bf2xF6est6L MJ+7bkkJSWXoYTMjYpSpVbf2iFZkvOxSSpDZDLYlPaXvWyZb8h6G8wHty3N9uZzK0gP7 pndg== 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=4yJKCBl09D/hpPnPojGmiESoXdw4oTmeRfHpG0NQmOc=; b=G3ldptciiu8ErbB/q41lQbDGNlxlRmPPsnyrBd4ovwq84+NIevKaFDFy5BBUmRIH1z 4jFPNDmMxxvnSv82CsaJ+6Msfom5X3qrF9iIGc7BVJvVHqTBwujLGkXZ1OX8TwkjpM3W WDQIqSS34O6fIQKx1nt5hmAEmBmRflH0OCgFq9ezeO/NR7UlD9Iumi6aK0N2DxImCgWv sWmyH8UMbcekMbwVztAGS5ddAb+wJYPpc6+Nem1WsfEkVypPJVGsSdBmGym+OGKIIlzx 1LE3cQe5uMyxweUFTqBVMKiyLn7QFwci4NwF40pQ5GEy1RTMvPNuyvLUwb/VjjkuBpAR bbtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=KCJefD9E; dkim=pass header.i=@codeaurora.org header.s=default header.b=Fymq/w03; 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 38-v6si6048039pld.640.2018.04.05.04.49.54; Thu, 05 Apr 2018 04:50:07 -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=KCJefD9E; dkim=pass header.i=@codeaurora.org header.s=default header.b=Fymq/w03; 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 S1751941AbeDELsk (ORCPT + 99 others); Thu, 5 Apr 2018 07:48:40 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58360 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbeDELsi (ORCPT ); Thu, 5 Apr 2018 07:48:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 456DC601D9; Thu, 5 Apr 2018 11:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522928917; bh=I5Yz6xPDnaIR803bGKE0CcqEZocJJn05EgRnYLCbg94=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KCJefD9EOrA38nl9rzvpuekkWLM16pFGRnQsM6d2hEdB7XxZk5Q08p5Kk9++g6fd6 Ih6OgV53I2zMc45IxdP/sLACNenUxuUnq7s4+PZxKzw9r5WavTSB4cNZM/wG90qP9S Sk28+3ZUZyKdLTJNZof5WbHu+OkmgJA28KDJc2AA= 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 93BC3601D9; Thu, 5 Apr 2018 11:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522928916; bh=I5Yz6xPDnaIR803bGKE0CcqEZocJJn05EgRnYLCbg94=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Fymq/w03ZwPgaUJuXGVWMMPdsgeeWX8mbLgafqXaZY64cORp+rU31x9H24QMMZguD uZLSnVhQ/44JsoDjlrxAbA1KiHi+c3yxq2TxHoBwzLiqma9UdTDn6x/5MFlAS6OdNr OhkCMYulW4Suycg/FuPcRSrfgyTtQJkJE65xNRhg= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 05 Apr 2018 07:48:36 -0400 From: okaya@codeaurora.org To: Arnd Bergmann Cc: Timur Tabi , sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, Linux ARM , linux-arch , Linux Kernel Mailing List , arndbergmann@gmail.com Subject: Re: [PATCH v3 1/5] io: define several IO & PIO barrier types for the asm-generic version In-Reply-To: References: <1522886301-25955-1-git-send-email-okaya@codeaurora.org> 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 On 2018-04-05 03:00, Arnd Bergmann wrote: > On Thu, Apr 5, 2018 at 1:58 AM, Sinan Kaya > wrote: > > Looks good, but I'd change the comments to ones that document exactly > what those barriers are for: > >> +#ifndef __io_ar >> +#ifdef rmb >> +/* prefer rmb() as the default implementation of __io_ar() if >> supported */ >> +#define __io_ar() rmb() > > /* > * prevent prefetching of coherent DMA data ahead of a dma-complete */ > >> +#ifndef __io_bw >> +#ifdef wmb >> +/* prefer wmb() as the default implementation of __io_bw() if >> supported */ >> +#define __io_bw() wmb() >> +#else > > /* flush writes to coherent DMA data before possibly triggering a DMA > read */ > >> +#ifndef __io_aw >> +#define __io_aw() barrier() >> +#endif > > /* serialize device access against a spin_unlock, usually handled there > */ > I will add these and post the next version. > The other four patches look perfect already. What's the timing we need > for > these patches? Are they 4.18 material, or do we need them in 4.17 and > stable kernels to work around known bugs? I was hoping to get all arch stuff in for 4.17. Driver developers started removing redundant wmb(). > > Arnd