Received: by 10.213.65.68 with SMTP id h4csp591651imn; Fri, 6 Apr 2018 05:52:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx489H4pSTzfGXJNkO0tcrj4cQAGLMJqMIf1nK+AhtODgwzvMY4PVTUZXMJ6eOxFkerXbLjdV X-Received: by 10.98.201.70 with SMTP id k67mr20242176pfg.141.1523019140139; Fri, 06 Apr 2018 05:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523019140; cv=none; d=google.com; s=arc-20160816; b=mgADH7LQZwDPd8cZNAuzbEAXHKMG6tqcXhsJ+XYRh3EN4uLtdKE20+EwVmLd6xtyQG CX3ex8Jr9mCRANjZoTG+733yUYAp6yoTa5mNCrSs05O6K3lNDt/ISxR0vrAU4Y2IEkhy HSYx8qc+bjN+HKz7BE/6YWhskEGx5P5FN9JFNhwy5JnkvjeadUciRT6155WqU0p5n9o9 G4O5eMrrfVgS1hohgqJdcXF/3ukTpIw4SgQfOi9iMyU0hXaFoK6bGes3YA6jsuNOwFq2 J5CqE6GsrBIArBx9fBAdacIjFqhjLwcOsfNGrYwbPTXLW93EbkB0AMrZrvR3kkiaRyFb gn3g== 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=7Vs8hqBGFGgraNhxbKjDKVqF+4BIfXzHeGldC/4e3nQ=; b=JGMqC/4wkRxWIZC9BUJzINiAE3uAcCZJxl2FlO3R4PJ3Fepo+6ocT9WYqoIIj2WjWR KF1eXisPwfDr/tRmyItCQMupc9IrGXDcaxyZSSVjOTMTm0zXDDnD0g/r0Dl3Uupoz7cA RXWF9TSZ9qj8ng4oFRrdPbITHH3T7C6J+uzQ1Vik/hqsyVFzDBjo8LrQ2VzjpH+fMnrw +SK5l5i1ku2PWCJUxrRt0/s1bNG5+5V2d0knGGUmTlxsDnGiGcoxOesToKczYAMvAnZq 4dSXuHe3iauwQ7saRXGGbKEhSKtgYlHvcmAIfYtoxXZG2+tPp5bF/05UPBzK6WWNM1sW SMxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ldywig5q; dkim=pass header.i=@codeaurora.org header.s=default header.b=fI28qdkY; 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 a190si7223082pge.436.2018.04.06.05.52.05; Fri, 06 Apr 2018 05:52:20 -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=ldywig5q; dkim=pass header.i=@codeaurora.org header.s=default header.b=fI28qdkY; 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 S1752615AbeDFMuy (ORCPT + 99 others); Fri, 6 Apr 2018 08:50:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47656 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752291AbeDFMuw (ORCPT ); Fri, 6 Apr 2018 08:50:52 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CCC9860A00; Fri, 6 Apr 2018 12:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523019051; bh=1qiupIpCyNV6IPriUeXGValQZGFXccTqO2d1fmnmfQw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ldywig5qkVL0WsBZPvVJ92pYUIN0CjXKkFMY20MFHRINH9zi/idvqdDuUr6WdxjN4 DtGMtXEanPTAj5GE4i0Wg21eOxTnwwNQTEsclpNZBvX4uWcleoxH20KO677fP5R28B Y3Wl6VJW0iJqervaJWirsadJLha/+KRIrDfhZNh4= 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 DB350601C4; Fri, 6 Apr 2018 12:50:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523019050; bh=1qiupIpCyNV6IPriUeXGValQZGFXccTqO2d1fmnmfQw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fI28qdkYYyJymOHJx1z8G9kDIcQf3JlJy2Rbh8Qkh74H5HW53mDydi9H4oPD2s4pe IE/bJ6aOXX5pQBKXPm7WUb4Nh1w5FFLb+NSkrqj1TwmxkMHBY77FydcJScVNsHEb77 Vbu2sxDIM3IMVlxyiPjzU8FeuL+OOWBkZKTp42TM= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 06 Apr 2018 08:50:50 -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 , linux-s390 , Martin Schwidefsky , Heiko Carstens , Ley Foon Tan , "moderated list:NIOS2 ARCHITECTURE" , arndbergmann@gmail.com Subject: Re: [PATCH v4 1/5] io: define several IO & PIO barrier types for the asm-generic version In-Reply-To: References: <1522933753-19589-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-06 06:19, Arnd Bergmann wrote: > On Thu, Apr 5, 2018 at 3:09 PM, Sinan Kaya > wrote: >> Getting ready to harden readX()/writeX() and inX()/outX() semantics >> for the >> generic implementation. >> >> Defining two set of macros as __io_br() and __io_ar() to indicate >> actions >> to be taken before and after MMIO read. >> >> Defining two set of macros as __io_bw() and __io_aw() to indicate >> actions >> to be taken before and after MMIO write. >> >> Defining two set of macros as __io_pbw() and __io_paw() to indicate >> actions >> to be taken before and after Port IO write. >> >> Defining two set of macros as __io_pbr() and __io_par() to indicate >> actions >> to be taken before and after Port IO read. >> >> If rmb() is available for the architecture, prefer rmb() as the >> default >> implementation of __io_ar()/__io_par(). >> >> If wmb() is available for the architecture, prefer wmb() as the >> default >> implementation of __io_bw()/__io_pbw(). >> >> Signed-off-by: Sinan Kaya > > I've applied the series to my asm-generic tree now, I will give it a > few days > in linux-next to see if any obvious regressions happen, and then send > a pull request. > > Checking the list of architectures that are affected by this, I see > h8300, microblaze, nios2, openrisc, s390, sparc, um, unicore32, > and xtensa, all of which use asm-generic/io.h without overriding > the default readl/writel. > > I would guess that at least s390 doesn't need the barriers > (maintainers on Cc now), but there may be others that want to > override the new barriers with weaker ones where an MMIO > access is guaranteed to serialize against DMA, or where > a specialized barrier for this case exists. > > Looking over the asm-generic implementation once more now, > I wonder if we should change the relaxed accessors to not have > any barriers (back to the version before your series) rather than > defaulting them to having the same barriers as the regular > readl/writel. I can do a follow up patch. You want to map them to raw api without any barriers as before. Right? > > Arnd