From patchwork Sun Jan 22 03:19:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: afzal mohammed X-Patchwork-Id: 9530741 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 8E470601D4 for ; Sun, 22 Jan 2017 03:21:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F64328358 for ; Sun, 22 Jan 2017 03:21:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7410B28387; Sun, 22 Jan 2017 03:21:25 +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=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2BFD028358 for ; Sun, 22 Jan 2017 03:21:25 +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 1cV8iZ-0001gS-VM; Sun, 22 Jan 2017 03:21:24 +0000 Received: from mail-pg0-f67.google.com ([74.125.83.67]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cV8iW-0001NX-AD for linux-arm-kernel@lists.infradead.org; Sun, 22 Jan 2017 03:21:21 +0000 Received: by mail-pg0-f67.google.com with SMTP id 194so10432177pgd.0 for ; Sat, 21 Jan 2017 19:20:59 -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=fX8jakKgeM/zPlG/hS0/8n2WbRpKulNgUutiBE01WUw=; b=IQsRldLG0I+u2eRX8O0vBsuVnBxjnUvaVkUO9OL3Fy6b2hjnpBUJulyCZuiFIKWEwT PqVHNRo9JVKF7pduLLwEADXLYixR72daT8qjg7b7kXzpWa6SkobvWUvHT1ddYG2DtP5h BvKNEm682BP0E0/TPV7KGdvET+GUHEaF2Y9SLk/q1Bm8lHlTl2B9UuqWYf3p62zCZujN Rhf2AJ7IsmZv5wya3Mgv+PEbNHocIRZibA/ZCPprdTKh+C34UN/LM3VVPRR7+94Y45LF UeUksk5yUJ6Lkx9ATErqJdGk2U7pHm0Kt0+2N9dAtM0wZrmOo4EbF8D/UEw6A6/u0aam x/9w== 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=fX8jakKgeM/zPlG/hS0/8n2WbRpKulNgUutiBE01WUw=; b=bqTNA9HByIx6z4R0vIeAn4ivddJEVyMmQeMEkFcPLB2RtBxHcD+9qHOAVpKVaSBvWQ iIfimhO2H4+InXXhfmAr6OR4ZIuIpyTLNKZ6M1Aj4imCeWauURaYrrhBrPRguNUmSPxo s3+fThCrM5HloPytMSrZSoy/koPD3O+oWeQSjEK1AxAIJ75BNOMWZ0r/fSmiWa5teOcN 75zdPOmJXYmIo25gHZasygx5cohAdijH36/dypVUlvhR0+5leakOI4RESaBa4LP2zv/r ufjFEKId0xOpTJXbAgMqFtk0IXM5PNabwyDXan/UmjsaO93cF7S1Pu32xj88ERqVggJh 6knQ== X-Gm-Message-State: AIkVDXJnVInapLf+Bcmk9yHh+r2AFrPZYBqFJxMc6tkBPfdvpT/cAE5iHmJzv1nLW5iEuw== X-Received: by 10.84.233.136 with SMTP id l8mr33749737plk.169.1485055199514; Sat, 21 Jan 2017 19:19:59 -0800 (PST) Received: from localhost.localdomain ([223.227.141.101]) by smtp.gmail.com with ESMTPSA id b10sm26979952pga.21.2017.01.21.19.19.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 21 Jan 2017 19:19:58 -0800 (PST) From: afzal mohammed To: Russell King - ARM Linux Subject: [PATCH v2 1/4] ARM: mmu: decouple VECTORS_BASE from Kconfig Date: Sun, 22 Jan 2017 08:49:47 +0530 Message-Id: <20170122031947.13242-1-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170122031652.13074-1-afzal.mohd.ma@gmail.com> References: <20170122031652.13074-1-afzal.mohd.ma@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170121_192120_388350_72064594 X-CRM114-Status: GOOD ( 13.93 ) 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: Jisheng Zhang , Vladimir Murzin , linux-kernel@vger.kernel.org, afzal mohammed , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth 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. For no-MMU, exception base address is dynamically determined in subsequent patches. To preserve bisectability, now make the macro applicable for no-MMU scenario too. Thanks to 0-DAY kernel test infrastructure that found the bisectability issue. This macro will be restricted to MMU case upon dynamically determining exception base address for no-MMU. Once exception address is handled dynamically for no-MMU, VECTORS_BASE can be removed from Kconfig. Suggested-by: Russell King Signed-off-by: afzal mohammed --- v2: Fix bisectability issue on !MMU builds UL suffix on VECTORS_BASE definition 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..0b5416fe7709 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -111,6 +111,8 @@ #endif /* !CONFIG_MMU */ +#define VECTORS_BASE UL(0xffff0000) + /* * We fix the TCM memories max 32 KiB ITCM resp DTCM at these * locations 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..823e119a5daa 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(VECTORS_BASE, VECTORS_BASE + PAGE_SIZE), #ifdef CONFIG_HAVE_TCM MLK(DTCM_OFFSET, (unsigned long) dtcm_end), MLK(ITCM_OFFSET, (unsigned long) itcm_end),