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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 2AF39C282DD for ; Wed, 8 Jan 2020 17:40:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F333720692 for ; Wed, 8 Jan 2020 17:40:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pRYB3o/T"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="u/qKB30A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F333720692 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ACULAB.COM Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zDylXeYbQYWMsUofnlTJcxpne9AfgYfZnpGWHo1rGNw=; b=pRYB3o/TbOpxyw OU2SisRwMaBbdJ/Rz0/EJYFj9n5PWbUu6ZSWw2BDCu7lSCtQHZk5QYEi1EZD3J0j44UaAEXpLMU1h SjCRytRO9/nHmPZMDI8sQmmUusVR0cHMazLJ2fZj5k1qS3Nglnw+vRRtTHoidIeYQFzKW3hu8jzOk 9LGoWn+BiIdH1ko5+V4uYGuoE5VEKicukN/cXprUnm6YrCjzUM4ZKaPb429AZJ1ZwiO2lELesfjM7 ffMgNWxGIeaXKWSYYUMWXSpgiwH8bdkvTJI7lzYMKwjkaJRvKm7qO2rQ1HMz00OFWTb/mQnpTxflB Xt/OnV+BRDiCMRPfceEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipFJc-00026M-Ur; Wed, 08 Jan 2020 17:40:20 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipFJb-00026E-Ha for linux-snps-arc@bombadil.infradead.org; Wed, 08 Jan 2020 17:40:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=isDE66TDzLwOPMoBB+GwF0KLMbySHhbhBl4lSkj7SXc=; b=u/qKB30AF2b7ndto2xFcR21A7t AU7lg5opJt13ZdIg/safWpr+5D0XqmfZ8or1Blv04+cUUC8RWOO5Ym3b/hPpcWKuJ3O8kDDNSIZbb kz88mZGIfQ9kt9574CCaKQSMw2B/9PXAeTI299Qo2N2A5dabA7PgBMTHVLXMTIl8IsAvoDjdmqBK4 xS25eJ9t/hImgN9p1IpmB/sptMPK4BXBpPIoTMqEoesWoVLgpOi19Bhw63ZhCoqkZs06iYER6jm/w S1N9c9SlYh+WViwFJjfQxLx7sIr6nfKx0q3jRfb8bkid6EZKhiYdZ77IEq1WhHEcV3R0RAZfI4I5y D0Ldf15A==; Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipFJz-0005XC-GW for linux-snps-arc@lists.infradead.org; Wed, 08 Jan 2020 17:40:45 +0000 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-2-XMFewsroMBqNVmL4iq_bTQ-1; Wed, 08 Jan 2020 17:39:44 +0000 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 8 Jan 2020 17:39:42 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Wed, 8 Jan 2020 17:39:42 +0000 From: David Laight To: 'Christophe Leroy' , Geert Uytterhoeven Subject: RE: [RFT 00/13] iomap: Constify ioreadX() iomem argument Thread-Topic: [RFT 00/13] iomap: Constify ioreadX() iomem argument Thread-Index: AQHVxgB0oW/g95TA9k2fcgn+xgLf36fhB6DA Date: Wed, 8 Jan 2020 17:39:42 +0000 Message-ID: <334434313e1642768995acc03a51214f@AcuMS.aculab.com> References: <1578415992-24054-1-git-send-email-krzk@kernel.org> <2355489c-a207-1927-54cf-85c04b62f18f@c-s.fr> <00a43e5c-0708-d49a-9cc4-eb2ce8b4cf99@c-s.fr> In-Reply-To: <00a43e5c-0708-d49a-9cc4-eb2ce8b4cf99@c-s.fr> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: XMFewsroMBqNVmL4iq_bTQ-1 X-Mimecast-Spam-Score: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200108_174043_585288_92013646 X-CRM114-Status: UNSURE ( 8.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , Jiri Slaby , "Michael S. Tsirkin" , David Airlie , "nouveau@lists.freedesktop.org" , Jason Wang , DRI Development , "virtualization@lists.linux-foundation.org" , "James E.J. Bottomley" , Paul Mackerras , Linux-Arch , Dave Jiang , Yoshinori Sato , Helge Deller , Linux-sh list , Alexey Brodkin , Krzysztof Kozlowski , Ben Skeggs , Dave Airlie , Matt Turner , arcml , Nick Kossifidis , Allen Hubbe , Arnd Bergmann , Jon Mason , Ivan Kokshaysky , Thomas Gleixner , Mauro Carvalho Chehab , Kalle Valo , Richard Henderson , Parisc List , netdev , linux-wireless , Linux Kernel Mailing List , Luis Chamberlain , Vineet Gupta , Daniel Vetter , alpha , "linux-ntb@googlegroups.com" , Andrew Morton , Linux Media Mailing List , linuxppc-dev , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org From: Christophe Leroy > Sent: 08 January 2020 08:49 ... > And as pointed by Arnd, the volatile is really only necessary for the > dereference itself, should the arch use dereferencing. I've had trouble with some versions of gcc and reading of 'volatile unsigned char *'. It tended to follow the memory read with an extra mask with 0xff. (I suspect that internally the value landed into a temporary 'int' variable.) I got better code using memory barriers. So putting an asm barrier for the exact location of the memory read either side of the read should have the desired effect without adding extra instructions. (You might think 'volatile' would mean that - but it doesn't.) David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc