mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	konrad.wilk@oracle.com, tglx@linutronix.de, hpa@linux.intel.com,
	stefano.stabellini@eu.citrix.com
Subject: [tip:x86/mm] x86, init : Move memblock_x86_reserve_range PGTABLE to find_early_table_space
Date: Tue, 21 Jun 2011 20:38:11 GMT	[thread overview]
Message-ID: <tip-1938931a20da89359fb3f1189d46f9b0f29e5117@git.kernel.org> (raw)
In-Reply-To: <1307470409-7654-3-git-send-email-stefano.stabellini@eu.citrix.com>

Commit-ID:  1938931a20da89359fb3f1189d46f9b0f29e5117
Gitweb:     http://git.kernel.org/tip/1938931a20da89359fb3f1189d46f9b0f29e5117
Author:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
AuthorDate: Tue, 7 Jun 2011 19:13:29 +0100
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 21 Jun 2011 13:07:14 -0700

x86, init : Move memblock_x86_reserve_range PGTABLE to find_early_table_space

Now that find_early_table_space knows how to calculate the exact amout
of memory needed by the kernel pagetable, we can reserve the range
directly in find_early_table_space.

This allows Xen to know what memory range these will occupy and
therefore how to manage that memory.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Link: http://lkml.kernel.org/r/1307470409-7654-3-git-send-email-stefano.stabellini@eu.citrix.com
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/mm/init.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 15590fd..36bacfe 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -104,6 +104,10 @@ static void __init find_early_table_space(unsigned long start,
 
 	printk(KERN_DEBUG "kernel direct mapping tables up to %lx @ %lx-%lx\n",
 		end, pgt_buf_start << PAGE_SHIFT, pgt_buf_top << PAGE_SHIFT);
+
+	if (pgt_buf_top > pgt_buf_start)
+		memblock_x86_reserve_range(pgt_buf_start << PAGE_SHIFT,
+				 pgt_buf_top << PAGE_SHIFT, "PGTABLE");
 }
 
 struct map_range {
@@ -301,10 +305,6 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 		printk(KERN_DEBUG "initial kernel pagetable allocation wasted %lx"
 				" pages\n", pgt_buf_top - pgt_buf_end);
 
-	if (!after_bootmem && pgt_buf_end > pgt_buf_start)
-		memblock_x86_reserve_range(pgt_buf_start << PAGE_SHIFT,
-				 pgt_buf_end << PAGE_SHIFT, "PGTABLE");
-
 	if (!after_bootmem)
 		early_memtest(start, end);
 

  reply	other threads:[~2011-06-21 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 18:13 [PATCH 0/3] x86: remove x86_init.mapping.pagetable_reserve Stefano Stabellini
2011-06-07 18:13 ` [PATCH 1/3] x86: calculate precisely the memory needed by init_memory_mapping stefano.stabellini
2011-06-20 22:37   ` H. Peter Anvin
2011-06-21 17:57     ` Stefano Stabellini
2011-06-21 18:02       ` H. Peter Anvin
2011-06-21 20:37   ` [tip:x86/mm] x86, mm: Calculate " tip-bot for Stefano Stabellini
2011-06-07 18:13 ` [PATCH 2/3] Revert "x86,xen: introduce x86_init.mapping.pagetable_reserve" stefano.stabellini
2011-06-21 20:37   ` [tip:x86/mm] " tip-bot for Stefano Stabellini
2011-06-07 18:13 ` [PATCH 3/3] x86: move memblock_x86_reserve_range PGTABLE to find_early_table_space stefano.stabellini
2011-06-21 20:38   ` tip-bot for Stefano Stabellini [this message]
     [not found] ` <m2n.s.1QU0lc-137774@chiark.greenend.org.uk>
2011-06-17 17:11   ` [Xen-devel] [PATCH 1/3] x86: calculate precisely the memory needed by init_memory_mapping Ian Jackson
2011-06-20 19:16     ` Stefano Stabellini
2011-06-21 20:58 ` [PATCH 0/3] x86: remove x86_init.mapping.pagetable_reserve Ingo Molnar
2011-06-22 17:16   ` Stefano Stabellini

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=tip-1938931a20da89359fb3f1189d46f9b0f29e5117@git.kernel.org \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome