From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 08/12] SFI, x86: hook e820() for memory map initialization Date: Wed, 08 Jul 2009 14:37:08 -0700 Message-ID: <4A551184.1020707@zytor.com> References: <1247026438-20891-1-git-send-email-lenb@kernel.org> <5bf6b3c7c08a76ea8dc52e9e07728c2958938952.1247025117.git.len.brown@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from terminus.zytor.com ([198.137.202.10]:52432 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755833AbZGHViH (ORCPT ); Wed, 8 Jul 2009 17:38:07 -0400 In-Reply-To: <5bf6b3c7c08a76ea8dc52e9e07728c2958938952.1247025117.git.len.brown@intel.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Len Brown Cc: x86@kernel.org, sfi-devel@simplefirmware.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Feng Tang , Len Brown This bothers me... we keep saying that memory map initialization belongs to the boot loader, and yet we keep doing the opposite. This isn't just an arbitrary difference, either: it is pretty essential to being able to use the early range allocator safely. -hpa Len Brown wrote: > From: Feng Tang > > Signed-off-by: Feng Tang > Signed-off-by: Len Brown > --- > arch/x86/kernel/e820.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c > index c4ca89d..e399d0e 100644 > --- a/arch/x86/kernel/e820.c > +++ b/arch/x86/kernel/e820.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -1437,6 +1438,10 @@ char *__init default_machine_specific_memory_setup(void) > < 0) { > u64 mem_size; > > + /* if SFI mmap table exists, use SFI to setup e820 mmap */ > + if (!sfi_init_memory_map()) > + return "SFI"; > + > /* compare results from other methods and take the greater */ > if (boot_params.alt_mem_k > < boot_params.screen_info.ext_mem_k) {