From patchwork Sun Nov 24 12:36:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3226651 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 305E8C045B for ; Sun, 24 Nov 2013 12:37:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35D9820606 for ; Sun, 24 Nov 2013 12:36:59 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AB2D20605 for ; Sun, 24 Nov 2013 12:36:58 +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 1VkYvh-0000Hw-6F; Sun, 24 Nov 2013 12:36:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VkYve-0002oP-PZ; Sun, 24 Nov 2013 12:36:46 +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 1VkYvb-0002nk-Tk for linux-arm-kernel@lists.infradead.org; Sun, 24 Nov 2013 12:36:44 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 0E7ED83A; Sun, 24 Nov 2013 13:36:07 +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 895906E2; Sun, 24 Nov 2013 13:36:04 +0100 (CET) From: Ezequiel Garcia To: , Subject: [PATCH] ARM: pxa: Move iotable mapping inside vmalloc region Date: Sun, 24 Nov 2013 09:36:11 -0300 Message-Id: <1385296571-23599-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-20131124_073644_065397_FC8D80A7 X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) Cc: Nicolas Pitre , eric.y.miao@gmail.com, linux@arm.linux.org.uk, Ezequiel Garcia , haojian.zhuang@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, let's add some nicer defines to make the code more readable. Cc: Nicolas Pitre Signed-off-by: Ezequiel Garcia --- arch/arm/mach-pxa/generic.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 4225417..7c01095 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -77,6 +78,11 @@ EXPORT_SYMBOL(get_clk_frequency_khz); * Note: virtual 0xfffe0000-0xffffffff is reserved for the vector table * and cache flush area. */ + +#define UNCACHED_PHY 0x00000000 +#define UNCACHED_SIZE SZ_1M +#define UNCACHED_VIRT (VMALLOC_END - UNCACHED_SIZE) + static struct map_desc common_io_desc[] __initdata = { { /* Devs */ .virtual = 0xf2000000, @@ -84,9 +90,9 @@ static struct map_desc common_io_desc[] __initdata = { .length = 0x02000000, .type = MT_DEVICE }, { /* UNCACHED_PHYS_0 */ - .virtual = 0xff000000, - .pfn = __phys_to_pfn(0x00000000), - .length = 0x00100000, + .virtual = UNCACHED_VIRT, + .pfn = __phys_to_pfn(UNCACHED_PHY), + .length = UNCACHED_SIZE, .type = MT_DEVICE } };