From patchwork Fri Dec 17 08:08:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 414991 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBH88piK029801 for ; Fri, 17 Dec 2010 08:08:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751824Ab0LQIIt (ORCPT ); Fri, 17 Dec 2010 03:08:49 -0500 Received: from vms173005pub.verizon.net ([206.46.173.5]:63305 "EHLO vms173005pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750Ab0LQIIt (ORCPT ); Fri, 17 Dec 2010 03:08:49 -0500 Received: from localhost.localdomain ([unknown] [74.104.161.234]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LDK002O6BY8J198@vms173005.mailsrvcs.net>; Fri, 17 Dec 2010 02:08:38 -0600 (CST) Received: from localhost.localdomain (x980 [127.0.0.1]) by localhost.localdomain (8.14.4/8.14.4) with ESMTP id oBH88T2S018182; Fri, 17 Dec 2010 03:08:30 -0500 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.4/8.14.4/Submit) with ESMTP id oBH88R1d018177; Fri, 17 Dec 2010 03:08:28 -0500 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Fri, 17 Dec 2010 03:08:27 -0500 (EST) From: Len Brown X-X-Sender: lenb@x980 To: Jack Steiner Cc: hpa@zytor.com, Henrique de Moraes Holschuh , tony.luck@gmail.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, gbeshers@sgi.com Subject: [PATCH] ACPI: use ioremap_cache() In-reply-to: Message-id: References: <20101214220932.GA1206@sgi.com> <20101215024136.GB19601@sgi.com> <20101215164635.GA27373@sgi.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 17 Dec 2010 08:08:51 +0000 (UTC) diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index cc8335e..009a7e0 100644 --- a/arch/ia64/include/asm/io.h +++ b/arch/ia64/include/asm/io.h @@ -426,6 +426,11 @@ extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size) extern void iounmap (volatile void __iomem *addr); extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); extern void early_iounmap (volatile void __iomem *addr, unsigned long size); +static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size) +{ + return ioremap(unsigned long phys_addr, unsigned long size); +} + /* * String version of IO memory access ops: diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 966fedd..85eba53 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -324,7 +324,7 @@ acpi_os_map_memory(acpi_physical_address phys, acpi_size size) pg_off = round_down(phys, PAGE_SIZE); pg_sz = round_up(phys + size, PAGE_SIZE) - pg_off; - virt = ioremap(pg_off, pg_sz); + virt = ioremap_cache(pg_off, pg_sz); if (!virt) { kfree(map); return NULL; @@ -646,7 +646,7 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width) virt_addr = acpi_map_vaddr_lookup(phys_addr, size); rcu_read_unlock(); if (!virt_addr) { - virt_addr = ioremap(phys_addr, size); + virt_addr = ioremap_cache(phys_addr, size); unmap = 1; } if (!value) @@ -682,7 +682,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width) virt_addr = acpi_map_vaddr_lookup(phys_addr, size); rcu_read_unlock(); if (!virt_addr) { - virt_addr = ioremap(phys_addr, size); + virt_addr = ioremap_cache(phys_addr, size); unmap = 1; }