LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH -v2 6/6] x86: Rename e820_table_* to pgt_buf_*
Date: Thu, 30 Dec 2010 13:54:34 -0800	[thread overview]
Message-ID: <4D1CFF9A.9050002@kernel.org> (raw)
In-Reply-To: <4D1933E5.9000300@kernel.org>


Now it is found from memblock way.

Change the name to purpose related.

-v2: Ingo found "4/6 x86: Use early pre-allocated page table buffer top-down"
     cause 32bit crash.
     and need to drop it, So update this one accordingly.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/include/asm/init.h |    6 +++---
 arch/x86/mm/init.c          |   20 ++++++++++----------
 arch/x86/mm/init_32.c       |    8 ++++----
 arch/x86/mm/init_64.c       |    4 ++--
 arch/x86/xen/mmu.c          |    2 +-
 5 files changed, 20 insertions(+), 20 deletions(-)

Index: linux-2.6/arch/x86/include/asm/init.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/init.h
+++ linux-2.6/arch/x86/include/asm/init.h
@@ -11,8 +11,8 @@ kernel_physical_mapping_init(unsigned lo
 			     unsigned long page_size_mask);
 
 
-extern unsigned long __initdata e820_table_start;
-extern unsigned long __meminitdata e820_table_end;
-extern unsigned long __meminitdata e820_table_top;
+extern unsigned long __initdata pgt_buf_start;
+extern unsigned long __meminitdata pgt_buf_end;
+extern unsigned long __meminitdata pgt_buf_top;
 
 #endif /* _ASM_X86_INIT_32_H */
Index: linux-2.6/arch/x86/mm/init.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init.c
+++ linux-2.6/arch/x86/mm/init.c
@@ -18,9 +18,9 @@
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 
-unsigned long __initdata e820_table_start;
-unsigned long __meminitdata e820_table_end;
-unsigned long __meminitdata e820_table_top;
+unsigned long __initdata pgt_buf_start;
+unsigned long __meminitdata pgt_buf_end;
+unsigned long __meminitdata pgt_buf_top;
 
 int after_bootmem;
 
@@ -73,12 +73,12 @@ static void __init find_early_table_spac
 	if (base == MEMBLOCK_ERROR)
 		panic("Cannot find space for the kernel page tables");
 
-	e820_table_start = base >> PAGE_SHIFT;
-	e820_table_end = e820_table_start;
-	e820_table_top = e820_table_start + (tables >> PAGE_SHIFT);
+	pgt_buf_start = base >> PAGE_SHIFT;
+	pgt_buf_end = pgt_buf_start;
+	pgt_buf_top = pgt_buf_start + (tables >> PAGE_SHIFT);
 
 	printk(KERN_DEBUG "kernel direct mapping tables up to %lx @ %lx-%lx\n",
-		end, e820_table_start << PAGE_SHIFT, e820_table_top << PAGE_SHIFT);
+		end, pgt_buf_start << PAGE_SHIFT, pgt_buf_top << PAGE_SHIFT);
 }
 
 struct map_range {
@@ -272,9 +272,9 @@ unsigned long __init_refok init_memory_m
 
 	__flush_tlb_all();
 
-	if (!after_bootmem && e820_table_end > e820_table_start)
-		memblock_x86_reserve_range(e820_table_start << PAGE_SHIFT,
-				 e820_table_end << PAGE_SHIFT, "PGTABLE");
+	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);
Index: linux-2.6/arch/x86/mm/init_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_32.c
+++ linux-2.6/arch/x86/mm/init_32.c
@@ -61,10 +61,10 @@ bool __read_mostly __vmalloc_start_set =
 
 static __init void *alloc_low_page(void)
 {
-	unsigned long pfn = e820_table_end++;
+	unsigned long pfn = pgt_buf_end++;
 	void *adr;
 
-	if (pfn >= e820_table_top)
+	if (pfn >= pgt_buf_top)
 		panic("alloc_low_page: ran out of memory");
 
 	adr = __va(pfn * PAGE_SIZE);
@@ -162,8 +162,8 @@ static pte_t *__init page_table_kmap_che
 	if (pmd_idx_kmap_begin != pmd_idx_kmap_end
 	    && (vaddr >> PMD_SHIFT) >= pmd_idx_kmap_begin
 	    && (vaddr >> PMD_SHIFT) <= pmd_idx_kmap_end
-	    && ((__pa(pte) >> PAGE_SHIFT) < e820_table_start
-		|| (__pa(pte) >> PAGE_SHIFT) >= e820_table_end)) {
+	    && ((__pa(pte) >> PAGE_SHIFT) < pgt_buf_start
+		|| (__pa(pte) >> PAGE_SHIFT) >= pgt_buf_end)) {
 		pte_t *newpte;
 		int i;
 
Index: linux-2.6/arch/x86/mm/init_64.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_64.c
+++ linux-2.6/arch/x86/mm/init_64.c
@@ -314,7 +314,7 @@ void __init cleanup_highmap(void)
 
 static __ref void *alloc_low_page(unsigned long *phys)
 {
-	unsigned long pfn = e820_table_end++;
+	unsigned long pfn = pgt_buf_end++;
 	void *adr;
 
 	if (after_bootmem) {
@@ -324,7 +324,7 @@ static __ref void *alloc_low_page(unsign
 		return adr;
 	}
 
-	if (pfn >= e820_table_top)
+	if (pfn >= pgt_buf_top)
 		panic("alloc_low_page: ran out of memory");
 
 	adr = early_memremap(pfn * PAGE_SIZE, PAGE_SIZE);
Index: linux-2.6/arch/x86/xen/mmu.c
===================================================================
--- linux-2.6.orig/arch/x86/xen/mmu.c
+++ linux-2.6/arch/x86/xen/mmu.c
@@ -1807,7 +1807,7 @@ static __init pte_t mask_rw_pte(pte_t *p
 	 * early_ioremap fixmap slot, make sure it is RO.
 	 */
 	if (!is_early_ioremap_ptep(ptep) &&
-	    pfn >= e820_table_start && pfn < e820_table_end)
+	    pfn >= pgt_buf_start && pfn < pgt_buf_end)
 		pte = pte_wrprotect(pte);
 
 	return pte;

  reply	other threads:[~2010-12-30 21:55 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-18  0:58 [PATCH 0/3] memblock related top down Yinghai Lu
2010-12-28  0:47 ` [PATCH 0/6] memblock related further cleanup for x86 Yinghai Lu
     [not found] ` <4D19320B.7030007@kernel.org>
2010-12-28  0:47   ` [PATCH 1/6] x86: Change get_max_mapped() to inline Yinghai Lu
2010-12-29 23:05     ` H. Peter Anvin
2010-12-29 23:30       ` Yinghai Lu
2010-12-29 23:37         ` Yinghai Lu
2010-12-29 23:42           ` H. Peter Anvin
2010-12-29 23:45     ` [PATCH -v2 " Yinghai Lu
2011-02-16  8:50     ` [tip:x86/mm] " tip-bot for Yinghai Lu
2010-12-28  0:48   ` [PATCH 2/6] x86, 64bit, numa: Allocate memnodemap under max_pfn_mapped Yinghai Lu
2011-02-16  8:50     ` [tip:x86/mm] x86-64, " tip-bot for Yinghai Lu
2010-12-28  0:48   ` [PATCH 3/6] x86, 64bit, numa: Put pgtable to local node memory Yinghai Lu
2010-12-29 23:46     ` [PATCH -v2 " Yinghai Lu
2010-12-29 23:50       ` H. Peter Anvin
2010-12-30  0:11         ` Yinghai Lu
2010-12-30  0:39           ` David Rientjes
2010-12-30  0:58             ` H. Peter Anvin
2010-12-30  1:07               ` David Rientjes
2010-12-30  1:53                 ` H. Peter Anvin
2010-12-30  9:06                   ` Ingo Molnar
2010-12-30 10:28                     ` [boot crash] " Ingo Molnar
2010-12-30 10:30                       ` Ingo Molnar
2010-12-30 12:01                         ` [build failure] " Ingo Molnar
2010-12-30 18:53                           ` David Rientjes
2010-12-30 18:54                             ` [patch] x86, numa: Fix CONFIG_DEBUG_PER_CPU_MAPS without NUMA emulation David Rientjes
2011-01-06 20:39                               ` David Rientjes
2011-01-06 21:25                                 ` Yinghai Lu
2011-01-06 23:58                                   ` David Rientjes
2011-01-07 15:32                               ` [tip:x86/numa] " tip-bot for David Rientjes
2010-12-30 21:18                         ` [boot crash] Re: [PATCH -v2 3/6] x86, 64bit, numa: Put pgtable to local node memory Yinghai Lu
     [not found]                           ` <AANLkTimpyRXS9dNFATh4GqtA46uynutAvK7Qb5S7WPFO@mail.gmail.com>
     [not found]                             ` <20110105134434.GA22816@elte.hu>
2011-01-05 21:24                               ` Yinghai Lu
2011-01-07 20:41                               ` [PATCH] memblock: Don't adjust size in memblock_find_base() Yinghai Lu
2011-01-10  5:56                                 ` Benjamin Herrenschmidt
2011-01-10  6:59                                   ` Yinghai Lu
2011-01-12  1:35                                   ` Yinghai Lu
2011-01-29  0:37                               ` [PATCH - resend] " Yinghai Lu
2011-02-03 20:25                                 ` Andrew Morton
2011-02-03 20:37                                   ` Yinghai Lu
2011-02-16  8:51     ` [tip:x86/mm] x86-64, numa: Put pgtable to local node memory tip-bot for Yinghai Lu
2010-12-28  0:48   ` [PATCH 4/6] x86: Use early pre-allocated page table buffer top-down Yinghai Lu
2010-12-28  0:48   ` [PATCH 5/6] x86, 64bit: Move out cleanup higmap [_brk_end, _end) out of init_memory_mapping() Yinghai Lu
2011-02-16  8:51     ` [tip:x86/mm] x86-64: " tip-bot for Yinghai Lu
2010-12-28  0:48   ` [PATCH 6/6] x86: Rename e820_table_* to pgt_buf_* Yinghai Lu
2010-12-30 21:54     ` Yinghai Lu [this message]
2010-12-28 20:21 ` [PATCH 0/3] memblock related top down H. Peter Anvin
2010-12-28 21:36   ` Yinghai Lu
2010-12-28 22:09     ` H. Peter Anvin
2010-12-28 22:25       ` Yinghai Lu

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=4D1CFF9A.9050002@kernel.org \
    --to=yinghai@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH -v2 6/6] x86: Rename e820_table_* to pgt_buf_*' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).