mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>,
	lkml <linux-kernel@vger.kernel.org>,
	fastboot <fastboot@lists.osdl.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH] Reserve Bootmem fix for booting nondefault location kernel
Date: Wed, 16 Mar 2005 18:45:12 +0530	[thread overview]
Message-ID: <1110978912.3575.35.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: x86-nondefault-kernel-reserve-bootmem-fix.patch --]
[-- Type: text/x-patch, Size: 1401 bytes --]


This patch fixes a problem with reserving memory during boot up of a kernel
built for non-default location. Currently boot memory allocator reserves the
memory required by kernel image, boot allocaotor bitmap etc. It assumes that
kernel is loaded at 1MB (HIGH_MEMORY hard coded to 1024*1024). But kernel can
be built for non-default locatoin, hence existing hardcoding will lead to
reserving unnecessary memory. This patch fixes it.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---

 linux-2.6.11-mm3-vivek/arch/i386/kernel/setup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/i386/kernel/setup.c~x86-nondefault-kernel-reserve-bootmem-fix arch/i386/kernel/setup.c
--- linux-2.6.11-mm3/arch/i386/kernel/setup.c~x86-nondefault-kernel-reserve-bootmem-fix	2005-03-15 14:15:25.391856008 +0530
+++ linux-2.6.11-mm3-vivek/arch/i386/kernel/setup.c	2005-03-15 14:16:12.780651816 +0530
@@ -1135,8 +1135,8 @@ void __init setup_bootmem_allocator(void
 	 * the (very unlikely) case of us accidentally initializing the
 	 * bootmem allocator with an invalid RAM area.
 	 */
-	reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(min_low_pfn) +
-			 bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY));
+	reserve_bootmem(__PHYSICAL_START, (PFN_PHYS(min_low_pfn) +
+			 bootmap_size + PAGE_SIZE-1) - (__PHYSICAL_START));
 
 	/*
 	 * reserve physical page 0 - it's a special BIOS page on many boxes,
_

                 reply	other threads:[~2005-03-16 13:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1110978912.3575.35.camel@localhost.localdomain \
    --to=vgoyal@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=fastboot@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®