Received: by 10.213.65.68 with SMTP id h4csp1603093imn; Thu, 5 Apr 2018 00:01:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx49nKAZZXeDjPn3mUcazYYZAMnE6CgJ6WefFlFD4KIn/2RG21oewA1u+wtZ165vHoAUjydxn X-Received: by 10.101.89.6 with SMTP id f6mr13728094pgu.178.1522911698348; Thu, 05 Apr 2018 00:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522911698; cv=none; d=google.com; s=arc-20160816; b=TAvahj6ZmmgmLgWbbloSOM11QhJI+3BkWbLUw0m70/Kta+8FXQNK6Qi3eqTzlJJwcj GoNZ9IfU1NxFWenSjLql33sJZuos9LgyoskJam9kwWCiHcFGTvAOGNLX5rhxr5RC5vCW Qbplu1/iqeTpBxdV2KrLNSKeBqwm0MYAQBYNFDTfk2UNCt+9T0G3SQsMaEEGLsbrUZeZ ZBRimT41mm6y+1hcUyRK+icSdnENL+a9Bqw3mpSuU0YXLJ7saZAGDfy43BbsezJyqpJ9 M/KeR+Nin+8fwZMUqvUWrfCM1ff+3tPNJPc3nBfqL1aa4CK5NecuELF+0mvoc7E4IwQt nhQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=9o9T2ucjyz+ATMgfIsfzxtB7UKFrG6bpdLfdpMSIm9M=; b=Iq6ciedQ+mVPwc+QENRTNbV+NcdOHjHl8olflXGF3v8s+us8P4cVxlMXsKbz9rk6/z pfYx+P53L5LIKIzMQMl7+pMtAugnWnWQj6aAajNsvBcAnMF9Qq+qeIY40Ls7DkmRn3gX 3QvoZPbpBiNRHn+uWxPrNNlhrv005bWl5+/U45sDYkFWSUmZyojZUMG8gwMiZV8EltZW qZ9WnLlMtiaSgngfo89b6OVyIeOEWhN/aHAJEY/AAp0+3CMbgFlJv3NFD6PVwbdUbouE y08KdXJyRq9AvqTPdY0Jk1a1smaQ5Z7divad25IAXvln6Sb7SjH3vwyJY2boKehWgb2H Peaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=g0THUeMs; 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 b70si5602903pfd.153.2018.04.05.00.01.22; Thu, 05 Apr 2018 00:01:38 -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=fail header.i=@gmail.com header.s=20161025 header.b=g0THUeMs; 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 S1751236AbeDEHAL (ORCPT + 99 others); Thu, 5 Apr 2018 03:00:11 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:39489 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750853AbeDEHAK (ORCPT ); Thu, 5 Apr 2018 03:00:10 -0400 Received: by mail-qk0-f196.google.com with SMTP id j73so25255249qke.6; Thu, 05 Apr 2018 00:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9o9T2ucjyz+ATMgfIsfzxtB7UKFrG6bpdLfdpMSIm9M=; b=g0THUeMsqq2YYFilS9C9KBF+JGmnEBNK5RqyQp5WDUqZWQWqwHfSmu42uAY4pxzF/V qBpE131KIF11ot2FTP0jVaXvxyXF7OdAf2R0D4P/Mv1RaXzvjH87mNMvIMzP5Mrd0gWq KbVAJ4MU2B8bFv1JMZnxpRq5gg8xZkjYcAPyFoAvqgcOQNIBBeqREgFizaWdHwjkGnOp sVgFaNwooHGCIYszEhcdFhaznTGX971wPpilQFMlbpZDYhB8fodZjGP4m/8lPb74HWCt rOQcPavmntl92mHIzrVCIiz/1157j6mlxZzixCc21xvBDzhFmJNlMt7rOsV79wTVRiNY 5msQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9o9T2ucjyz+ATMgfIsfzxtB7UKFrG6bpdLfdpMSIm9M=; b=FpS45Y4T6TauOopoGSLVrrm2/204SKSVJvWSSTPm8jkh+4mmvKsS10+yg7PJ4oGZZE 3RfCnjYOPQPrEFboefb3wglyqylCIGi3pOje/VIbLziqczm1Zx0TUK2zOB1du/SLD0z7 OIMqAHkIZsLVbPEJ36Fpgj3GVl48OCl+y2TWFKQPSO0ccg7PkoblCn8gRsWQnwbUzLCj 1fP0JbZ0qjZz7VJR6f+zEQEvh+bObj5mkTQ5vN/mEocseMyGr8pipWvJOHExtGyxxZwE +luokIqKtAvzYIywT8bvsUFIW+ltY4duh1JAGoDrNWRNzFgBr9QhblKKw1cKCnwBVhK+ a1jA== X-Gm-Message-State: ALQs6tBwMmrkITI194OipcJuzGLUtfroBxHDxEY59hTjo1dX0qzX7UWX i2ixQSHZPoRjM+Q2CfHYmoWCrFLGTikeDhbLX/I= X-Received: by 10.55.56.211 with SMTP id f202mr27229539qka.288.1522911609116; Thu, 05 Apr 2018 00:00:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Thu, 5 Apr 2018 00:00:08 -0700 (PDT) In-Reply-To: <1522886301-25955-1-git-send-email-okaya@codeaurora.org> References: <1522886301-25955-1-git-send-email-okaya@codeaurora.org> From: Arnd Bergmann Date: Thu, 5 Apr 2018 09:00:08 +0200 X-Google-Sender-Auth: Yc1Eb7_VDfGhebMhMa8dsAvK6Wc Message-ID: Subject: Re: [PATCH v3 1/5] io: define several IO & PIO barrier types for the asm-generic version To: Sinan Kaya Cc: Timur Tabi , sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, Linux ARM , linux-arch , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ 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? Arnd