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 B3BE8C43331 for ; Mon, 11 Nov 2019 10:28: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 8580C214DB for ; Mon, 11 Nov 2019 10:28: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="eKSX6mHT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8580C214DB 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-riscv-bounces+infradead-linux-riscv=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=oz9ua9eL+MeoBF7oqit4iLb//2ioR1K9SoNAdiHxwnA=; b=eKSX6mHTtUAeWl JnIme8g+Qju2X0QSMeNu+oRn0ZFHFNNJs1mPR+aRbxAmUkaUFbhtrKzxouGuRNR4zmSKQPguk86JC jVVnaLVxDUKWVDjpI59kos1naIR0P4xl10ObANQviqfscvtGq+yTCRJ1XwMw8OQ1XbNOzOIBfMyPL a2iR0Kwsty44xks0XjGEi0YiiDsOO5AT8WJxN/En8EkgXEqhzRvwUixbn6vRaxetZBd1ivIQXYDgF Ujf9t/xZHNLLidNBY3Lpi5BAQT5BXJoyGsAQBX9DTgRYXYPANUSL7T+cOb1XAu4/0Mu8XLl55yfma YKZE6+ZAzQOHji7SiqDw==; 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 1iU6vm-0002WH-85; Mon, 11 Nov 2019 10:28:22 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU6vD-0002Mi-Ug; Mon, 11 Nov 2019 10:27:53 +0000 Received: from mail-qk1-f180.google.com ([209.85.222.180]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MAwsT-1iaPNJ4BL7-00BMOw; Mon, 11 Nov 2019 11:27:45 +0100 Received: by mail-qk1-f180.google.com with SMTP id m4so10676129qke.9; Mon, 11 Nov 2019 02:27:44 -0800 (PST) X-Gm-Message-State: APjAAAVOcaIXowaYWV26OnNq7OfHeOnLV2fRtEIOO0GSew5a98ZTMHYh mE+WuWLHN4Sxip34FD94sW/A42YP4l0l/bAyvOY= X-Google-Smtp-Source: APXvYqyGcZLqyAcsV/LYDmC4LmwcrdvTKQ+w9XPWbssEa676VSOvhgPE+TuvbqMkbxFWBQMzT6WHPBHBJZYF9AVQbpE= X-Received: by 2002:a37:4f0a:: with SMTP id d10mr9711437qkb.286.1573468063366; Mon, 11 Nov 2019 02:27:43 -0800 (PST) MIME-Version: 1.0 References: <20191029064834.23438-1-hch@lst.de> <20191029064834.23438-11-hch@lst.de> <20191111101531.GA12294@lst.de> In-Reply-To: <20191111101531.GA12294@lst.de> From: Arnd Bergmann Date: Mon, 11 Nov 2019 11:27:27 +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:g9LlT8Z1JHlzLB6SNSfcO5sWp/l6U2N6RVGHBkyacWeU05aoYIN +hFxshQYDzrPC6c18BQZJc3mfAQTSf6iou6ij8jkt0ce+cDXyArfGGaE6XP6nLN/rvoq+TE mrEWISxLedZq5md78FxyL7YlCAtM4ljyuq3ZGLXtLTCOvAaoa5FyPWZDSLRuk4SG7Tvn3rh gITCvRxDQjCsF4+8CP09g== X-UI-Out-Filterresults: notjunk:1;V03:K0:Ra7eKRFULgs=:181SuxpQ2oHpLjUgLQ4Ikm OJ7kslICPvSPsSnnTLGheLfQwX5N96Rz1y69ZV1rtdkrUYppn2dw81yioagcbX0M9oXcxptFb gygm4EQ62RCWfRmIenWLs2MbL6pybRE2cdMCNntZ8E/JGFIIQkAhTNoUpDlJROPNrZgLo9Qwd +hEKo4TfaVkItYcOxBN/nTgZWv7qLd9lBJ4f50+5/FM7Et6dOcFtEVm+Q7z/2lq783K4tWF/r 5L8K1oKhGqTNU7/k9DonTPwJ7HPSgOEessSxeFHd/BNqDJ8o+jWEVP6LGhJguLrx+Fxf6EXS3 kWS2vLPwmC5pWMo7z9mJM3CTSzx35XoQOzxrE1hqjoeOwG5p6VTDeUFXWlMqEpqqzHlSii3Zz CrI0VOb02ijsDx6BrKUJaJuBZ0d2BHC5Tyax+LDjSxknYxp/lu63IRnTy2bM/uIipPZnqZ5hk CMpAfUD/1RsgshLrXCqG8A0yj+src+zL4k6AVHIDcuKoneQaNjFXkLA2AgjOwg9Wb9v0roR3s 3hRCPBKTUl++7OPGBw14iPl3EgqXrcCGgg5r/6Kv3f7n+b3OjbY/lEwSKlHmYEc2mP0cJMhRo qi3918i4z4N3AeTuIe2jLG1qeF6UKMe2l70dxCDL6X7YMPryIje6dmPmvUG/chdsLZCh5udql 3rtiVI0K0DI/uhUIferGIvR7dzHdZNjctrWroMej4uhqmxa/aTbdYwGsyXNTXCYoOWQiKHWk8 6LodxYsLgI9YuRBxvfh5fFSWDumV/EyAtXb5hl/F6cbGYTPVkKx1G1de69gou5/jvVpsDixZA LmRgz3FeqARcuWLO3wQu7mtbUo4RymSgy9fC9GsWnvOfE/Wt84TAs5+dAo1xYS1S8PTOeakuA rVDLtiTX1KikAag1X1Ug== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_022748_290080_0BBA46D6 X-CRM114-Status: GOOD ( 15.84 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, Nov 11, 2019 at 11:15 AM Christoph Hellwig wrote: > > 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. As I understand, the point is that on PAT-enabled systems, the normal ioremap() *also* overrides the MTRR, citing from Documentation/x86/pat.rst: ==== ======= === ========================= ===================== MTRR Non-PAT PAT Linux ioremap value Effective memory type ==== ======= === ========================= ===================== PAT Non-PAT | PAT |PCD | ||PWT | ||| | WC 000 WB _PAGE_CACHE_MODE_WB WC | WC WC 001 WC _PAGE_CACHE_MODE_WC WC* | WC WC 010 UC- _PAGE_CACHE_MODE_UC_MINUS WC* | UC WC 011 UC _PAGE_CACHE_MODE_UC UC | UC ==== ======= === ========================= ===================== > 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. Ok, fair enough. Let's just go with your version for now, if only to not hold your series up more. I'd still suggest we change atyfb to only use ioremap_uc() on i386 and maybe ia64. I can send a patch for that. Arnd _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv