From patchwork Fri Jan 3 14:49:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 3431511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3A090C02DC for ; Fri, 3 Jan 2014 14:51:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2BFC20108 for ; Fri, 3 Jan 2014 14:51:17 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69BB9200CA for ; Fri, 3 Jan 2014 14:51:16 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vz65e-00068D-Q2; Fri, 03 Jan 2014 14:51:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vz65c-0008Mv-Av; Fri, 03 Jan 2014 14:51:08 +0000 Received: from smtp.citrix.com ([66.165.176.89]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vz65Z-0008M2-8t for linux-arm-kernel@lists.infradead.org; Fri, 03 Jan 2014 14:51:06 +0000 X-IronPort-AV: E=Sophos;i="4.95,598,1384300800"; d="scan'208";a="89550944" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 03 Jan 2014 14:50:42 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Fri, 3 Jan 2014 09:50:41 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1Vz65C-0006fO-0s; Fri, 03 Jan 2014 14:50:42 +0000 Date: Fri, 3 Jan 2014 14:49:54 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Russell King - ARM Linux Subject: Re: [PATCH] arm64/xen: redefine xen_remap on arm64 In-Reply-To: <20140103143104.GN7383@n2100.arm.linux.org.uk> Message-ID: References: <1388386511-32276-1-git-send-email-baozich@gmail.com> <1388431259.2564.15.camel@deneb.redhat.com> <20140103143104.GN7383@n2100.arm.linux.org.uk> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140103_095105_517332_94223E49 X-CRM114-Status: GOOD ( 30.48 ) X-Spam-Score: -7.5 (-------) Cc: Konrad Rzeszutek Wilk , catalin.marinas@arm.com, Stefano Stabellini , linux-kernel@vger.kernel.org, Mark Salter , xen-devel@lists.xenproject.org, Chen Baozi , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 3 Jan 2014, Russell King - ARM Linux wrote: > On Fri, Jan 03, 2014 at 01:13:57PM +0000, Stefano Stabellini wrote: > > On Mon, 30 Dec 2013, Mark Salter wrote: > > > On Mon, 2013-12-30 at 14:55 +0800, Chen Baozi wrote: > > > > xen_remap used to be defined as ioremap_cached on arm64. In commit > > > > c04e8e2fe, a new ioremap_cache was implemented, and ioremap_cached > > > > was deleted, while xen_remap stays the same. This would lead to > > > > the failure when building with CONFIG_HVC_XEN. Redefined xen_remap > > > > on arm64 as ioremap_cache on arm64 to fix it. > > > > > > > > > > I missed that include of arm header by arm64 when looking for users > > > of arm64's ioremap_cached() when working on commit c04e8e2fe. Anyway, > > > grepping the kernel tree, I see: > > > > > > ioremap_cached() > > > defined by: arm, metag, unicore32 > > > used by: arch/arm/include/asm/xen/page.h > > > drivers/mtd/maps/pxa2xx-flash.c > > > > > > ioremap_cache() > > > defined by: arm64, sh, xtensa, ia64, x86 > > > used by: drivers/video/vesafb.c > > > drivers/char/toshiba.c > > > drivers/acpi/apei > > > drivers/lguest/lguest_device.c > > > drivers/sfi/sfi_core.c > > > include/linux/acpi_io.h > > > > > > I think it would be better to just avoid the confusion and the ifdef in > > > asm/xen/page.h by globally changing ioremap_cached to ioremap_cache. > > > > While I welcome the suggestion, this is a critical fix for a regression > > that I think should go in as soon as possible, maybe 3.13-rc7, while I > > don't think that a global s/ioremap_cached/ioremap_cache would be > > acceptable at this stage. > > Since it's just one driver, just make the change for ARM (provided the > grep is accurate.) pxa2xx-flash is only used on ARM and not the other > two listed there, so looks like metag and unicore just decided to copy > ARM. > > My grep concurs with yours. > > So... just change ioremap_cached -> ioremap_cache in > arch/arm/include/asm/io.h > arch/arm/include/asm/xen/page.h > drivers/mtd/maps/pxa2xx-flash.c > > to fix the problem. OK. That would be Rob's patch below. Are you going to take care of sending it to Linus? Thanks for the quick reply. From robherring2@gmail.com Fri Nov 8 21:26:03 2013 Date: Fri, 8 Nov 2013 15:25:56 -0600 From: Rob Herring To: linux-arm-kernel@lists.infradead.org Cc: Rob Herring , Russell King , Stefano Stabellini , Catalin Marinas , Will Deacon Subject: [PATCH] ARM: rename ioremap_cached to ioremap_cache From: Rob Herring ioremap_cache is more aligned with other architectures. There are only 2 users of this in the kernel: pxa2xx-flash and Xen. This fixes Xen build failures on arm64: drivers/tty/hvc/hvc_xen.c:233:2: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration] drivers/xen/grant-table.c:1174:3: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration] drivers/xen/xenbus/xenbus_probe.c:778:4: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration] Signed-off-by: Rob Herring Cc: Russell King Cc: Stefano Stabellini Cc: Catalin Marinas Cc: Will Deacon --- arch/arm/include/asm/io.h | 2 +- arch/arm/include/asm/xen/page.h | 2 +- drivers/mtd/maps/pxa2xx-flash.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 3c597c2..fbeb39c 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -329,7 +329,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t); */ #define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) #define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) -#define ioremap_cached(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED) +#define ioremap_cache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED) #define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC) #define iounmap __arm_iounmap diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 5d0e4c5..a8591fb 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h @@ -123,6 +123,6 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) return __set_phys_to_machine(pfn, mfn); } -#define xen_remap(cookie, size) ioremap_cached((cookie), (size)); +#define xen_remap(cookie, size) ioremap_cache((cookie), (size)); #endif /* _ASM_ARM_XEN_PAGE_H */ diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index d210d13..0f55589 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c @@ -73,7 +73,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev) return -ENOMEM; } info->map.cached = - ioremap_cached(info->map.phys, info->map.size); + ioremap_cache(info->map.phys, info->map.size); if (!info->map.cached) printk(KERN_WARNING "Failed to ioremap cached %s\n", info->map.name);