From patchwork Tue Apr 11 17:42:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 9675883 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1315C60231 for ; Tue, 11 Apr 2017 17:43:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BDE328538 for ; Tue, 11 Apr 2017 17:43:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00EAE28598; Tue, 11 Apr 2017 17:43:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 86C7D28538 for ; Tue, 11 Apr 2017 17:43:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7407E219428A3; Tue, 11 Apr 2017 10:43:15 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 41359219428A1 for ; Tue, 11 Apr 2017 10:43:14 -0700 (PDT) Received: by mail-pg0-x241.google.com with SMTP id o123so689838pga.1 for ; Tue, 11 Apr 2017 10:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+r9Z/4wkhmrYFjyWhSgVaLP/C78VtQS3glRRL3TLMc0=; b=U+WPjGDXG2u7LUddGlOQX7xxThRjCTwrys8NXIADFV8rnxlfmMwaCI8TYV4wLluwhh oEZDT1IiV/Jfz3QzIUAPIZbN/WhJ2lQvzNHZORotNNGL+7iU6/PvooCAiX+cBjSKsp7O +nutUI560QLiykTzo6zqTvWImhfVNCNDlAzgd6Niragyq3j9sIALPdvb+sI+ZKbBWzbd S5wXpFOVXZw/7nlVeisipqTT8wewRAIHG9395pyIXkcp9LxoHdDyiSFH/NRUxkoE5Fo1 Zw7SaqgnKKUKj7LRhhc+GqPTPFpOq/GLgMuNvKRZOUS3gq4U/3O01bNEPgJqc37ssBkZ MpNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+r9Z/4wkhmrYFjyWhSgVaLP/C78VtQS3glRRL3TLMc0=; b=EbuOoPbzZgZ260AYHKx9aCvbWoMDsrKdAy4ajyrcjdvn99VH5lrIAoQuNx4seOm3cb c2/sS9DPsOvRVbX+6gG0b3qB9E8WmB4k42bxUdk/X8Z2NzESHzNoh8iMBvOzmpH5IEFU 5F7517tymLrz3N5XUPo/sns/WKq9Qk5+IvL4yFPXAluwUHgAavLXDZEUGIMcelWgILHT JapvEjCZZMwEhUMiUVfohWwOyN537315WGUDa3+BrQy1tBkKgMExQTFJ4QZ0xnx6o8ZN j5hCXm6oOOQYR6hV3qrEPbdDWCf4dPLfH00eHfEtdTzYqAS3JY19sp4+wAa7rWsbGW9Y gxag== X-Gm-Message-State: AFeK/H19g/y0mRFb4+rsIFGPtkvH8IE4ScqbYw5DJ/cMSA8ULX0YEBLw9FsAfYXGwpuJPA== X-Received: by 10.99.125.73 with SMTP id m9mr34521478pgn.234.1491932594003; Tue, 11 Apr 2017 10:43:14 -0700 (PDT) Received: from localhost.localdomain ([103.57.0.128]) by smtp.gmail.com with ESMTPSA id r185sm20182582pfr.72.2017.04.11.10.43.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Apr 2017 10:43:13 -0700 (PDT) From: Oliver O'Halloran To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 7/9] powerpc/mm: Wire up ioremap_cache Date: Wed, 12 Apr 2017 03:42:31 +1000 Message-Id: <20170411174233.21902-8-oohall@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170411174233.21902-1-oohall@gmail.com> References: <20170411174233.21902-1-oohall@gmail.com> X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bsingharora@gmail.com, arbab@linux.vnet.ibm.com, linux-nvdimm@lists.01.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The default implementation of ioremap_cache() is aliased to ioremap(). On powerpc ioremap() creates cache-inhibited mappings by default which is almost certainly not what you wanted. Signed-off-by: Oliver O'Halloran --- arch/powerpc/include/asm/io.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 5ed292431b5b..839eb031857f 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -757,6 +757,8 @@ extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size, extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size); #define ioremap_nocache(addr, size) ioremap((addr), (size)) #define ioremap_uc(addr, size) ioremap((addr), (size)) +#define ioremap_cache(addr, size) \ + ioremap_prot((addr), (size), pgprot_val(PAGE_KERNEL)) extern void iounmap(volatile void __iomem *addr);