From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197AbbCWHzS (ORCPT ); Mon, 23 Mar 2015 03:55:18 -0400 Received: from mga11.intel.com ([192.55.52.93]:61079 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbbCWHzI (ORCPT ); Mon, 23 Mar 2015 03:55:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,450,1422950400"; d="scan'208";a="544809138" From: Jim Kukunas To: Linux Kernel , tom.zanussi@linux.intel.com Cc: Arjan van de Ven , "H. Peter Anvin" , tglx@linutronix.de, mingo@redhat.com, x86@kernel.org Subject: [PATCH 05/11] x86/xip: reserve memblock for only data Date: Mon, 23 Mar 2015 00:46:34 -0700 Message-Id: <1427096800-30452-6-git-send-email-james.t.kukunas@linux.intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1427096800-30452-1-git-send-email-james.t.kukunas@linux.intel.com> References: <1427096800-30452-1-git-send-email-james.t.kukunas@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nothing is loaded at the usual spot for .text, starting at CONFIG_PHYSICAL_START, so we don't reserve it. Additionally, the physical address of the _text isn't going to be physically contiguous with _data. Signed-off-by: Jim Kukunas --- arch/x86/kernel/setup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 98dc931..e2d85c4 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -869,8 +869,13 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p) void __init setup_arch(char **cmdline_p) { +#ifdef CONFIG_XIP_KERNEL + memblock_reserve(__pa_symbol(_sdata), + (unsigned long)__bss_stop - (unsigned long)_sdata); +#else memblock_reserve(__pa_symbol(_text), (unsigned long)__bss_stop - (unsigned long)_text); + #endif early_reserve_initrd(); -- 2.1.0