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.3 required=3.0 tests=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 8E2E3C17441 for ; Mon, 11 Nov 2019 10:15:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60E2D2184C for ; Mon, 11 Nov 2019 10:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726952AbfKKKPh (ORCPT ); Mon, 11 Nov 2019 05:15:37 -0500 Received: from verein.lst.de ([213.95.11.211]:48523 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbfKKKPg (ORCPT ); Mon, 11 Nov 2019 05:15:36 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 8B1EE68BE1; Mon, 11 Nov 2019 11:15:31 +0100 (CET) Date: Mon, 11 Nov 2019 11:15:31 +0100 From: Christoph Hellwig To: Arnd Bergmann Cc: Christoph Hellwig , Guo Ren , Michal Simek , Greentime Hu , Vincent Chen , Guan Xuetao , the arch/x86 maintainers , alpha , "open list:SYNOPSYS ARC ARCHITECTURE" , Linux ARM , "open list:QUALCOMM HEXAGON..." , linux-ia64@vger.kernel.org, linux-m68k , linux-mips@vger.kernel.org, "moderated list:NIOS2 ARCHITECTURE" , openrisc@lists.librecores.org, Parisc List , linux-riscv@lists.infradead.org, linux-s390 , Linux-sh list , sparclinux , linux-xtensa@linux-xtensa.org, linux-mtd , linux-arch , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 10/21] asm-generic: ioremap_uc should behave the same with and without MMU Message-ID: <20191111101531.GA12294@lst.de> References: <20191029064834.23438-1-hch@lst.de> <20191029064834.23438-11-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Mon, Nov 11, 2019 at 11:09:05AM +0100, Arnd Bergmann wrote: > 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. That's not how I understood it. Based on the code and the UC- explanation ioremap_uc always overrides the MTRR, which can still be present on more modern x86 systems. In fact I remember a patch floating around very recently adding another ioremap_uc caller in some Atom platform device driver that works around buggy MTRR tables. Also this series actually adds a new override and a few callers for ia64 platform code, which works very similar to x86 based on the comments in the code. That being said I'm not sure the callers in ia64 are really required, but it was the safest thing to do as part of this cleanup.