[PATCH 04 of 11] x86: fix early_ioremap pagetable ops

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Friday, January 25, 2008 - 2:23 pm

Put appropriate pagetable update hooks in so that paravirt knows
what's going on in there.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
---
 arch/x86/mm/ioremap.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -18,6 +18,7 @@
 #include <asm/fixmap.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
+#include <asm/pgalloc.h>
 
 #ifdef CONFIG_X86_64
 
@@ -265,7 +266,7 @@ void __init early_ioremap_init(void)
 
 	pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
 	memset(bm_pte, 0, sizeof(bm_pte));
-	set_pmd(pmd, __pmd(__pa(bm_pte) | _PAGE_TABLE));
+	pmd_populate_kernel(&init_mm, pmd, bm_pte);
 
 	/*
 	 * The boot-ioremap range spans multiple pmds, for which
@@ -295,6 +296,7 @@ void __init early_ioremap_clear(void)
 
 	pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
 	pmd_clear(pmd);
+	paravirt_release_pt(__pa(bm_pte) >> PAGE_SHIFT);
 	__flush_tlb_all();
 }
 


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00 of 11] x86: separate pmd lifetime from pgd, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 01 of 11] xen: fix mismerge in masking pte flags, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 02 of 11] x86: use the same pgd_list for PAE and 64-bit, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 03 of 11] x86: add mm parameter to paravirt_alloc_pd, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 04 of 11] x86: fix early_ioremap pagetable ops, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 05 of 11] x86: demacro asm-x86/pgalloc_32.h, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 06 of 11] x86: unify PAE/non-PAE pgd_ctor, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 07 of 11] x86: don't special-case pmd allocations a ..., Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 08 of 11] xen: deal with pmd being allocated/freed, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 09 of 11] x86: preallocate pmds at pgd creation time, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 10 of 11] x86: allocate and initialize unshared pmds, Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
[PATCH 11 of 11] x86: defer cr3 reload when doing pud_clear(), Jeremy Fitzhardinge, (Fri Jan 25, 2:23 pm)
Re: [PATCH 00 of 11] x86: separate pmd lifetime from pgd, Jeremy Fitzhardinge, (Mon Jan 28, 8:39 am)
Re: [PATCH 00 of 11] x86: separate pmd lifetime from pgd, Jeremy Fitzhardinge, (Mon Jan 28, 9:20 am)
Re: [PATCH 04 of 11] x86: fix early_ioremap pagetable ops, Ian Campbell, (Thu Jan 31, 12:01 pm)
Re: [PATCH 04 of 11] x86: fix early_ioremap pagetable ops, Jeremy Fitzhardinge, (Thu Jan 31, 12:52 pm)
Re: [PATCH 04 of 11] x86: fix early_ioremap pagetable ops, Jeremy Fitzhardinge, (Thu Jan 31, 1:41 pm)