From patchwork Sat Jan 7 17:22:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: afzal mohammed X-Patchwork-Id: 9503225 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 BC18C606E0 for ; Sat, 7 Jan 2017 17:22:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAF7128450 for ; Sat, 7 Jan 2017 17:22:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E3EC284C5; Sat, 7 Jan 2017 17:22:48 +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=ham 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 3692728450 for ; Sat, 7 Jan 2017 17:22:48 +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 1cPuhY-0003e8-M0; Sat, 07 Jan 2017 17:22:44 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cPuhS-0003FB-Hf for linux-arm-kernel@lists.infradead.org; Sat, 07 Jan 2017 17:22:40 +0000 Received: by mail-pg0-x242.google.com with SMTP id 204so392652pge.2 for ; Sat, 07 Jan 2017 09:22:18 -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=awnKV30uGPSPotONoRB6SkSkYBcqq/0cPnASGs8aeAE=; b=DsnozbjwZBV4d5kuUOqSO6TpmHk2yjlUIhx7Rlpiey8IilCSkAPwAqVBXnodBce4BR vGChmZ4lfFCsAV/z1CS7UvqFOqLftalj3lzxsnIaZVz4vFhaftLa6VcewJQ3u79TvN6/ Fb3Rz5L0WYTxP2B7nNaH0Krg4p8z+rCYwzXuds+HOJt4ajUnUKH5dgvOiizGzS9ryv03 Zrq7n8ViuywYU4G/6Sup23HVDmRQza+/TVs2GymT6TPNNnv67gFx1wE8r9Hzo0SKYcr8 wIF7HtXSa2XgoTG+dy63VUICM7mNke+Brp5CSLrRNQIctiEa7rNIBsa7Z+oMqH0xHdMC rArQ== 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=awnKV30uGPSPotONoRB6SkSkYBcqq/0cPnASGs8aeAE=; b=mBZxb9LeC43HM89mFcDLLqeQyriQhmfB/54Ivc881emLDa6ZLFcPGig9xCAURzXCMj ZlGyLqXOyaWvVelYB6SjPNLvFn/kZvuq221azy/Oxmdu5RUFdJu1UBdB838HmbdEiV39 YTJX+jdlt2gxEVFMTYOqRk5heFznmy9pvNa3aeT35wAkfPxeH179IrNDsWQZPYvDQruX eTSf5Y9dSU6CXnqntrk78JViKT3ewlUOCzGvuEnX4ZNxQrlVHpWf7qE8xVJLAffvNPAN LWGs/lSB2El3MNZGlmCZixtCR8B6e3DLix57EgfOZpayHzZRjDphZfOvWX3ehGgpm5hW /+9w== X-Gm-Message-State: AIkVDXKvnORKwCfERPNmxN9JJvdyvuHmcz76bQTcMyxRtPjOMQQZplYifIOqAjysyoSqNA== X-Received: by 10.84.131.65 with SMTP id 59mr176046624pld.79.1483809737717; Sat, 07 Jan 2017 09:22:17 -0800 (PST) Received: from localhost.localdomain ([49.203.213.27]) by smtp.gmail.com with ESMTPSA id p2sm11460967pgd.17.2017.01.07.09.22.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 07 Jan 2017 09:22:17 -0800 (PST) From: afzal mohammed To: Russell King - ARM Linux Subject: [PATCH WIP 3/4] ARM: mm: nommu: display dynamic exception base Date: Sat, 7 Jan 2017 22:52:00 +0530 Message-Id: <20170107172200.6397-1-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170107171339.GA5044@afzalpc> References: <20170107171339.GA5044@afzalpc> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170107_092238_627733_46C86D13 X-CRM114-Status: UNSURE ( 8.42 ) X-CRM114-Notice: Please train this message. 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 Display dynamically estimated nommu exception base. TODO: Dynamically update MMU case too. Signed-off-by: afzal mohammed --- arch/arm/mm/init.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 370581aeb871..1777ee23a6a2 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -39,6 +39,10 @@ #include "mm.h" +#ifndef CONFIG_MMU +extern unsigned long vectors_base; +#endif + #ifdef CONFIG_CPU_CP15_MMU unsigned long __init __clear_cr(unsigned long mask) { @@ -521,8 +525,13 @@ void __init mem_init(void) " .data : 0x%p" " - 0x%p" " (%4td kB)\n" " .bss : 0x%p" " - 0x%p" " (%4td kB)\n", +#ifdef CONFIG_MMU MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + (PAGE_SIZE)), +#else + MLK_ROUNDUP(vectors_base, vectors_base + PAGE_SIZE), +#endif + #ifdef CONFIG_HAVE_TCM MLK(DTCM_OFFSET, (unsigned long) dtcm_end), MLK(ITCM_OFFSET, (unsigned long) itcm_end),