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 F20E5C17445 for ; Mon, 11 Nov 2019 10:09:37 +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 C73C5214E0 for ; Mon, 11 Nov 2019 10:09:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WvXvYRXb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C73C5214E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de 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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0vKLvXO/mIInSf64m7oBHgrdwWqnHmDRR4nrPFWEHZk=; b=WvXvYRXb/wXD// k+0X5C6obpRo+DkXGprsZEvFZRys+r3bCRmpGb6DSufZEbA9EAXQk+Fvg16IjI0OKoXH5FDOpuv1E CGU6fi3P6EzlB7I7Tw/viHvLEkVgkzXM+MQ0SHHNC3+Qnt52A+WJC4+soZ/TZpZFJPH3PBK8Snd1D v5mO5zEnQkX2cJOjRMPYbgnK0kcS5E8O0lxfk3xUF67br3XXd/skmL2fRg+Qb9YYPTXDWfpfO+tKC c6c2BCcQIXPPWtftXjVGRrYtpPV8cOYinhX3JF1leBPOg+WuHJIfzOM6rIcHibB1p2gIVNrBm+kfi AgW3AXTq2S4eTozH4KVQ==; 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 1iU6db-00030t-LX; Mon, 11 Nov 2019 10:09:35 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU6dY-0002yo-Fh; Mon, 11 Nov 2019 10:09:34 +0000 Received: from mail-qt1-f182.google.com ([209.85.160.182]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MhClw-1hzybu0RoA-00eJP0; Mon, 11 Nov 2019 11:09:24 +0100 Received: by mail-qt1-f182.google.com with SMTP id o11so15010998qtr.11; Mon, 11 Nov 2019 02:09:22 -0800 (PST) X-Gm-Message-State: APjAAAWv8iyxmQLIDiBQXlIhkgflGohJWLHtW4EliIEZKA/EDK8oaCG5 CfqN35ml8WFWTRapvUY93fImXBgWBu/X1sRB1II= X-Google-Smtp-Source: APXvYqwUFI9CNnIwrAVKasmsTd09tLHKshCq1NYJLSrtULcDmOA+h22x7/m2tzlDDqS3Yhkmt+6zqdhU/D75oBqf0Ro= X-Received: by 2002:aed:3e41:: with SMTP id m1mr16150881qtf.142.1573466961656; Mon, 11 Nov 2019 02:09:21 -0800 (PST) MIME-Version: 1.0 References: <20191029064834.23438-1-hch@lst.de> <20191029064834.23438-11-hch@lst.de> In-Reply-To: <20191029064834.23438-11-hch@lst.de> From: Arnd Bergmann Date: Mon, 11 Nov 2019 11:09:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 10/21] asm-generic: ioremap_uc should behave the same with and without MMU To: Christoph Hellwig X-Provags-ID: V03:K1:Q8h95G51LGJ+lEYcrVT1mVBUea8IcQ9erH4GpK287lhazEIjqVx fP5/Hmr9Z8fUJXDW9BX2tI3T0GXc8PBIt8SKT2xff1DNk/o1NHJnmpbdOML4INTQEzzpYt5 xqkWqvP86f3z5WffbZ+79Hs+Tm3glF+cB0+IemNS/SWpM3zzk8XnGd/2o6EoavmRJP7p7Gc wsdc+4bcyovejoN9q/4gw== X-UI-Out-Filterresults: notjunk:1;V03:K0:fjmunqixS8A=:tPOToe43PB4w4u7CUTDKIq m1bdqRcsk9dsuqhBXaoEHetDB6dSvF21+y8LtHbTvG+5cPaYu5yFqfLpDDdSwCHObZqS+eGIW brWfxEtbJprKugXTZ+KxPquQiHCIiqWDPRQ3lJTTjHycTf6348F/VC3BfSqBuE8wnTZM6tTUk sY7JorQ2XAHogSHduJ/jDewUIuumelNB2ovaX3x7FAeTJhJrnWkELetSYDl+JETDJu2HrR4oz K9+s55kOv1kD5EPe294QVBQpQBvnlRQB1e6hsmwwB4WmQC6VwRkBFk9LB/Pmb+gG4MDo4YGZ5 YaY7aqG7gK7tq+iDOy7i2GdAaxGxBkIbBwcBVJ8PI29TN2QZW10zq4Dd8p6jf+SIYhbnw7iaq iFQDA3byabVewETU5MKDBoJKfYpCAJ50hIU2hcyMpu/WOBr8JYpjQlvqOSVV6C1OGrX9tb99r KNcK/sqCmv18xhuVEZxYWE8MVPfyw9pXetJUhK5GrY/vtSJkLsB8xxBhuzPHNhEdXqUqSUivZ d5/fL5n3i4kKvxiL6eRGannSRis3yGI13D7BeGccNDds/3q8ics9gqVbQs5C0d/m8iuUBbaJU /zg68xsyPC64G8hZZ911DK1zoRBI40P974MIHMaMLd8wjIOIYHnDoljeO43a0sqIRyPvs5cQA 0aVyGPFV4R5NmMTRe9x1HwvDiZtYZk5w0hAJlfNHxbP9mz9wC0FWRBhHMXXLbDbAkD+GPCHoo Sma5h+xjzqDC6zCfC96i3Ml0JgN7hjn/vTjeKNcnRM1Zgf6xJRMsP8iBgZyOB0ggjyq9yRnoV 4r8pzbO/MdoTcRUOTQdtjjh8erRrQh+aSzuIt2GsDNK+NdWaHBTU55t3RHmvHCDtGFuFCuPSo cK58ximM9pqnO7SLukGQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_020932_841685_563614B6 X-CRM114-Status: GOOD ( 13.64 ) 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: linux-ia64@vger.kernel.org, Linux-sh list , "linux-kernel@vger.kernel.org" , Guo Ren , sparclinux , linux-riscv@lists.infradead.org, Vincent Chen , linux-arch , linux-s390 , "open list:QUALCOMM HEXAGON..." , the arch/x86 maintainers , "open list:SYNOPSYS ARC ARCHITECTURE" , linux-xtensa@linux-xtensa.org, linux-m68k , openrisc@lists.librecores.org, Greentime Hu , "moderated list:NIOS2 ARCHITECTURE" , Guan Xuetao , Linux ARM , Michal Simek , Parisc List , linux-mips@vger.kernel.org, alpha , linux-mtd 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 On Tue, Oct 29, 2019 at 7:49 AM Christoph Hellwig wrote: > > Whatever reason there is for the existence of ioremap_uc, and the fact > that it returns NULL by default on architectures with an MMU applies > equally to nommu architectures, so don't provide different defaults. Makes sense. > In practice the difference is meaningless as the only portable driver > that uses ioremap_uc is atyfb which probably doesn't show up on nommu > devices. > +/* > + * ioremap_uc is special in that we do require an explicit architecture > + * implementation. In general you do now want to use this function in a > + * driver and use plain ioremap, which is uncached by default. Similarly > + * architectures should not implement it unless they have a very good > + * reason. > + */ > +#ifndef ioremap_uc > +#define ioremap_uc ioremap_uc > +static inline void __iomem *ioremap_uc(phys_addr_t offset, size_t size) > +{ > + return NULL; > +} > +#endif Maybe we could move the definition into the atyfb driver itself? As I understand it, the difference between ioremap()/ioremap_nocache() and ioremap_uc() only exists on pre-PAT x86-32 systems (i.e. 486, P5, Ppro, PII, K6, VIA C3), while on more modern systems (all non-x86, PentiumIII, Athlon, VIA C7) those three are meant to be synonyms anyway. Arnd _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc