From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758771AbZB0T1R (ORCPT ); Fri, 27 Feb 2009 14:27:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754646AbZB0T07 (ORCPT ); Fri, 27 Feb 2009 14:26:59 -0500 Received: from gw.goop.org ([64.81.55.164]:41922 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754495AbZB0T06 (ORCPT ); Fri, 27 Feb 2009 14:26:58 -0500 Message-ID: <49A83E7D.1080508@goop.org> Date: Fri, 27 Feb 2009 11:26:53 -0800 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: "H. Peter Anvin" CC: Yinghai Lu , Ingo Molnar , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: [PATCH RFC] x86: add brk allocation for very, very early allocations References: <49A829CE.9020509@goop.org> <49A83C52.5050801@zytor.com> In-Reply-To: <49A83C52.5050801@zytor.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org H. Peter Anvin wrote: > Jeremy Fitzhardinge wrote: > >> unsigned int boot_cpu_id __read_mostly; >> +__initdata unsigned long _brk_start, _brk_end; >> >> > > Better yet, initialize _brk_start and _brk_end statically: > > extern const char _end[]; > __initdata unsigned long _brk_start = (unsigned long)&_end; > __initdata unsigned long _brk_end = (unsigned long)&_end; > > That way it's available from the first instruction, and we can fully > remove the x86-32 init_pg_tables_end and replace it with _brk_end (thus > putting the initial page tables in the brk.) Yes. It doesn't work for Xen (the domain builder puts the initrd and Xen-built pagetable immediately after the kernel's bss), but its no problem to move the brk in that case. J