From patchwork Fri Nov 29 00:00:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3256031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C93509F1F4 for ; Fri, 29 Nov 2013 00:01:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E914420620 for ; Fri, 29 Nov 2013 00:01:25 +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 01BE9204AF for ; Fri, 29 Nov 2013 00:01:25 +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 1VmBWJ-0000r0-Bl; Fri, 29 Nov 2013 00:01:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VmBWG-0004yz-UH; Fri, 29 Nov 2013 00:01:16 +0000 Received: from top.free-electrons.com ([176.31.233.9] helo=mail.free-electrons.com) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VmBWD-0004y8-EE for linux-arm-kernel@lists.infradead.org; Fri, 29 Nov 2013 00:01:14 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 68033880; Fri, 29 Nov 2013 01:00:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost.localdomain (unknown [190.2.98.212]) by mail.free-electrons.com (Postfix) with ESMTPA id 792287C7; Fri, 29 Nov 2013 01:00:47 +0100 (CET) From: Ezequiel Garcia To: , Subject: [PATCH v2] ARM: pxa: Move iotable mapping inside vmalloc region Date: Thu, 28 Nov 2013 21:00:43 -0300 Message-Id: <1385683243-6688-1-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 1.8.1.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131128_190113_601559_BA00EC97 X-CRM114-Status: GOOD ( 11.18 ) X-Spam-Score: -1.2 (-) Cc: Nicolas Pitre , Russell King - ARM Linux , haojian.zhuang@gmail.com, David Heidelberger , Ezequiel Garcia , eric.y.miao@gmail.com 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to remove the following ugly message: BUG: mapping for 0x00000000 at 0xff000000 out of vmalloc space the iotable mappings should be re-located inside the vmalloc region. Such move was introduced at commit: commit 0536bdf33faff4d940ac094c77998cfac368cfff Author: Nicolas Pitre Date: Thu Aug 25 00:35:59 2011 -0400 ARM: move iotable mappings within the vmalloc region While at it, condition the mapping to PXA25x and PXA27x, which are the only platforms where it's used. Cc: Nicolas Pitre Cc: Russell King - ARM Linux Cc: David Heidelberger Signed-off-by: Ezequiel Garcia --- David, Is it possible for you to give this a try on your board? arch/arm/mach-pxa/generic.c | 6 ++++-- arch/arm/mach-pxa/include/mach/hardware.h | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 4225417..3c1b4fa 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -83,11 +83,13 @@ static struct map_desc common_io_desc[] __initdata = { .pfn = __phys_to_pfn(0x40000000), .length = 0x02000000, .type = MT_DEVICE +#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x) }, { /* UNCACHED_PHYS_0 */ - .virtual = 0xff000000, + .virtual = UNCACHED_PHYS_0, .pfn = __phys_to_pfn(0x00000000), - .length = 0x00100000, + .length = UNCACHED_SIZE, .type = MT_DEVICE +#endif } }; diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index ccb06e4..b365a72 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h @@ -14,13 +14,14 @@ #define __ASM_ARCH_HARDWARE_H #include +#include /* * Workarounds for at least 2 errata so far require this. * The mapping is set in mach-pxa/generic.c. */ -#define UNCACHED_PHYS_0 0xff000000 -#define UNCACHED_ADDR UNCACHED_PHYS_0 +#define UNCACHED_PHYS_0 (VMALLOC_END - UNCACHED_SIZE) +#define UNCACHED_SIZE SZ_1M /* * Intel PXA2xx internal register mapping: