From patchwork Wed Jan 18 20:37:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: afzal mohammed X-Patchwork-Id: 9524741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E69360113 for ; Wed, 18 Jan 2017 20:38:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D6EC285F0 for ; Wed, 18 Jan 2017 20:38:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0077D28624; Wed, 18 Jan 2017 20:38:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A33E2285F0 for ; Wed, 18 Jan 2017 20:38:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cTwzm-0002fi-QR; Wed, 18 Jan 2017 20:38:14 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cTwzj-0002eK-Hk for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2017 20:38:13 +0000 Received: by mail-pg0-x243.google.com with SMTP id 75so2182029pgf.3 for ; Wed, 18 Jan 2017 12:37:51 -0800 (PST) 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=8HP9KD99WXXZupwvAZYYGN34IFZM5qesTxYO/bWPBXY=; b=mLHK0G3p/T9mJfdBGCMj/wxyjkmbzyFGb5jhazcp0p2lYyVh3/FPv7itVrhNpd1Ppz ivAJPgQTKfHYuHAOyaceS+Q2P7g05cbtlSGAmgq9QA0LiCeOLLHfjhnB44bEp8O1uU6A eharUt7seXEW8xIUtLlv/s3YECCDqhnS3ai2xsf1pzbNCtB1z16qCTPFZWXSSc3Mv+le m8zoOS6aSF2MDdiUeeWSskpE5PgljUMY8drHr8xR7O/qfk0b8FCXEX849o0+h3/EC7JI g39POGrTUB1L646xX1+8MX8XgaDNGrNHZBRxuFAPkT1kDfGmK1LyX1gadQeW5jRDiDU4 I/xA== 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=8HP9KD99WXXZupwvAZYYGN34IFZM5qesTxYO/bWPBXY=; b=lEoZ8WdKtOhD0/QfnYzoLVluZFQWC6SFp6KXETOyxhrMdlj17oshBv42x71WOMX+j4 nCmNc21N+UDwAQzhUVxiXgt8fkbzK6spdtznQbRDAkbG4WXGRxhbbo4w8v+OHvERELZH i+5Qv0zBzUfVPfpahXrpGM4NSXL4sxQxD7SJfLzqH4jfj/y412fBqO/jfRdjH5bi94J2 td4HD38yWWa8Xcr6LZMM+BFCFmNe7W41CQhiZDhlDqrTWO38Slo2duil3HqU4cFtJcS1 d9TUFc9uepFuecPhTDF6RwgVezdYmh5+o0aC1F5tggIRplVrMeoS+etCp7Ywt+ozRyDA 2Vvw== X-Gm-Message-State: AIkVDXJjQ7Z4vPUfx/PsPymQINiUTveKGqyt1KYqY0qOhnJxNLoI/9fdw8C5m3Xcx1npPg== X-Received: by 10.99.208.21 with SMTP id z21mr6107297pgf.79.1484771871104; Wed, 18 Jan 2017 12:37:51 -0800 (PST) Received: from localhost.localdomain ([49.203.213.22]) by smtp.gmail.com with ESMTPSA id z70sm2830075pff.26.2017.01.18.12.37.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jan 2017 12:37:50 -0800 (PST) From: afzal mohammed To: Russell King - ARM Linux Subject: [PATCH 1/4] ARM: mmu: decouple VECTORS_BASE from Kconfig Date: Thu, 19 Jan 2017 02:07:39 +0530 Message-Id: <20170118203739.6400-1-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170118203525.6246-1-afzal.mohd.ma@gmail.com> References: <20170118203525.6246-1-afzal.mohd.ma@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170118_123811_620295_3F3DA644 X-CRM114-Status: GOOD ( 14.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Murzin , afzal mohammed , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 For MMU configurations, VECTORS_BASE is always 0xffff0000, a macro definition will suffice. Once exception address is handled dynamically for no-MMU also (this would involve taking care of region setup too), VECTORS_BASE can be removed from Kconfig. Suggested-by: Russell King Signed-off-by: afzal mohammed --- Though there was no build error without inclusion of asm/memory.h, to be on the safer side it has been added, to reduce chances of build breakage in random configurations. arch/arm/include/asm/memory.h | 2 ++ arch/arm/mach-berlin/platsmp.c | 3 ++- arch/arm/mm/dump.c | 5 +++-- arch/arm/mm/init.c | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 76cbd9c674df..9cc9f1dbc88e 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -83,6 +83,8 @@ #define IOREMAP_MAX_ORDER 24 #endif +#define VECTORS_BASE 0xffff0000 + #else /* CONFIG_MMU */ /* diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c index 93f90688db18..578d41031abf 100644 --- a/arch/arm/mach-berlin/platsmp.c +++ b/arch/arm/mach-berlin/platsmp.c @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -75,7 +76,7 @@ static void __init berlin_smp_prepare_cpus(unsigned int max_cpus) if (!cpu_ctrl) goto unmap_scu; - vectors_base = ioremap(CONFIG_VECTORS_BASE, SZ_32K); + vectors_base = ioremap(VECTORS_BASE, SZ_32K); if (!vectors_base) goto unmap_scu; diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c index 9fe8e241335c..21192d6eda40 100644 --- a/arch/arm/mm/dump.c +++ b/arch/arm/mm/dump.c @@ -18,6 +18,7 @@ #include #include +#include #include struct addr_marker { @@ -31,8 +32,8 @@ static struct addr_marker address_markers[] = { { 0, "vmalloc() Area" }, { VMALLOC_END, "vmalloc() End" }, { FIXADDR_START, "Fixmap Area" }, - { CONFIG_VECTORS_BASE, "Vectors" }, - { CONFIG_VECTORS_BASE + PAGE_SIZE * 2, "Vectors End" }, + { VECTORS_BASE, "Vectors" }, + { VECTORS_BASE + PAGE_SIZE * 2, "Vectors End" }, { -1, NULL }, }; diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 370581aeb871..cf47f86f79ed 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -521,8 +522,7 @@ void __init mem_init(void) " .data : 0x%p" " - 0x%p" " (%4td kB)\n" " .bss : 0x%p" " - 0x%p" " (%4td kB)\n", - MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + - (PAGE_SIZE)), + MLK(UL(VECTORS_BASE), UL(VECTORS_BASE) + (PAGE_SIZE)), #ifdef CONFIG_HAVE_TCM MLK(DTCM_OFFSET, (unsigned long) dtcm_end), MLK(ITCM_OFFSET, (unsigned long) itcm_end),