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: 749586 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w2ZbK6fgdz9sN6 for ; Wed, 12 Apr 2017 04:00:29 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="U+WPjGDX"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3w2ZbK4zBFzDq99 for ; Wed, 12 Apr 2017 04:00:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="U+WPjGDX"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3w2ZCR45FZzDq7j for ; Wed, 12 Apr 2017 03:43:15 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="U+WPjGDX"; dkim-atps=neutral Received: by mail-pg0-x244.google.com with SMTP id g2so675880pge.2 for ; Tue, 11 Apr 2017 10:43:15 -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=BlBedC8y5uO4CA9ORyRx173viLilpGRYusuZF/yBYlYTccPUrPiRpuO3J2i7UcEm/w JbgM0I0xwZUyENLjrkZb6g9+hmf4iidKocDg9ZE098AYpW6nj6zW9zb5Ai8waoOoZHXF 8thC+TvmbodN3kJ/mn1Q1/wEpEP2qaVEk2wNDx87vISAb3vsk+wj4U/aXuPuQvXCvgOs 4IombIBHfb6Zd59zJJIe4Xq2ldPGHMZEHzGmu7UhkTmvcdimEqMaVus2W7MGYrtkMnDc z7Fr8trzEOnHbbhdcIU/JeAw3HtTyokgx5OObrWRYQQ6UqQlwAsB6nDi+6nKKinXNGJX +IUw== X-Gm-Message-State: AFeK/H1M7P6vqY1+3T8Q9JY+ULAcvTU9ekSSvyXOdH35IJZWZ8pXiFZ7K0Lbr+y41rdhSQ== 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: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oliver O'Halloran , arbab@linux.vnet.ibm.com, linux-nvdimm@lists.01.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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);