From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26063C33C9E for ; Wed, 8 Jan 2020 08:35:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F212220705 for ; Wed, 8 Jan 2020 08:35:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=c-s.fr header.i=@c-s.fr header.b="fxUelGuu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727316AbgAHIf6 (ORCPT ); Wed, 8 Jan 2020 03:35:58 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:54687 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbgAHIf5 (ORCPT ); Wed, 8 Jan 2020 03:35:57 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 47t2dP2tfYz9v3gf; Wed, 8 Jan 2020 09:35:53 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=fxUelGuu; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id I0TjIRBHFA-4; Wed, 8 Jan 2020 09:35:53 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 47t2dP1Xwtz9v3gS; Wed, 8 Jan 2020 09:35:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1578472553; bh=pyCqgPPZ7kRofrDb80nScePrylWdxYR2l2/ULCClPrs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=fxUelGuuZbXfGsWb57/3BxUjvtvdC/2QbyAEo6YqIvKJAL5rv4xC8YAPDeq7nhud3 dkB/UdAQUigd1rFWPHMhgX/6Fa4jCdXgPI62S3zygNDeTcqR1ZOBKH62ej2i0cflHq zb2g6a/VdTBtVa3azjNLc7pwBVFpYUnXR94BgWzQ= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2FF4A8B7EC; Wed, 8 Jan 2020 09:35:54 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id PkGUzhhRpTGx; Wed, 8 Jan 2020 09:35:54 +0100 (CET) Received: from [172.25.230.100] (po15451.idsi0.si.c-s.fr [172.25.230.100]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BE1C98B7EA; Wed, 8 Jan 2020 09:35:53 +0100 (CET) Subject: Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument To: Krzysztof Kozlowski , Geert Uytterhoeven Cc: Rich Felker , Jiri Slaby , "Michael S. Tsirkin" , David Airlie , Jason Wang , DRI Development , virtualization@lists.linux-foundation.org, "James E.J. Bottomley" , netdev , Paul Mackerras , Linux-Arch , Dave Jiang , Yoshinori Sato , Helge Deller , Linux-sh list , Alexey Brodkin , Ben Skeggs , nouveau@lists.freedesktop.org, Dave Airlie , Matt Turner , arcml , Nick Kossifidis , Allen Hubbe , Arnd Bergmann , alpha , Ivan Kokshaysky , Thomas Gleixner , Mauro Carvalho Chehab , Kalle Valo , Richard Henderson , Parisc List , Vineet Gupta , linux-wireless , Linux Kernel Mailing List , Luis Chamberlain , Daniel Vetter , Jon Mason , linux-ntb@googlegroups.com, Andrew Morton , Linux Media Mailing List , linuxppc-dev , "David S. Miller" References: <1578415992-24054-1-git-send-email-krzk@kernel.org> From: Christophe Leroy Message-ID: <2355489c-a207-1927-54cf-85c04b62f18f@c-s.fr> Date: Wed, 8 Jan 2020 09:35:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 08/01/2020 à 09:18, Krzysztof Kozlowski a écrit : > On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven wrote: >> >> Hi Krzysztof, >> >> On Wed, Jan 8, 2020 at 9:07 AM Geert Uytterhoeven wrote: >>> On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski wrote: >>>> The ioread8/16/32() and others have inconsistent interface among the >>>> architectures: some taking address as const, some not. >>>> >>>> It seems there is nothing really stopping all of them to take >>>> pointer to const. >>> >>> Shouldn't all of them take const volatile __iomem pointers? >>> It seems the "volatile" is missing from all but the implementations in >>> include/asm-generic/io.h. >> >> As my "volatile" comment applies to iowrite*(), too, probably that should be >> done in a separate patch. >> >> Hence with patches 1-5 squashed, and for patches 11-13: >> Reviewed-by: Geert Uytterhoeven > > I'll add to this one also changes to ioreadX_rep() and add another > patch for volatile for reads and writes. I guess your review will be > appreciated once more because of ioreadX_rep() > volatile should really only be used where deemed necessary: https://www.kernel.org/doc/html/latest/process/volatile-considered-harmful.html It is said: " ... accessor functions might use volatile on architectures where direct I/O memory access does work. Essentially, each accessor call becomes a little critical section on its own and ensures that the access happens as expected by the programmer." Christophe