diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-08 18:06:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 05:02:01 -0400 |
commit | 836fe2f291cb450a6193fa713878efe7d32bec6e (patch) | |
tree | 4fffc5218fd37fc79f0c127460b6a568608257be /arch/x86/xen | |
parent | 8745f8b0b914cf1d617ecc49726c24011858c74e (diff) |
xen: use set_pte_vaddr
Make Xen's set_pte_mfn() use set_pte_vaddr rather than copying it.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/mmu.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index a8f023271819..eb31ed291b93 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -282,35 +282,7 @@ void xen_set_pmd(pmd_t *ptr, pmd_t val) | |||
282 | */ | 282 | */ |
283 | void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags) | 283 | void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags) |
284 | { | 284 | { |
285 | pgd_t *pgd; | 285 | set_pte_vaddr(vaddr, mfn_pte(mfn, flags)); |
286 | pud_t *pud; | ||
287 | pmd_t *pmd; | ||
288 | pte_t *pte; | ||
289 | |||
290 | pgd = swapper_pg_dir + pgd_index(vaddr); | ||
291 | if (pgd_none(*pgd)) { | ||
292 | BUG(); | ||
293 | return; | ||
294 | } | ||
295 | pud = pud_offset(pgd, vaddr); | ||
296 | if (pud_none(*pud)) { | ||
297 | BUG(); | ||
298 | return; | ||
299 | } | ||
300 | pmd = pmd_offset(pud, vaddr); | ||
301 | if (pmd_none(*pmd)) { | ||
302 | BUG(); | ||
303 | return; | ||
304 | } | ||
305 | pte = pte_offset_kernel(pmd, vaddr); | ||
306 | /* <mfn,flags> stored as-is, to permit clearing entries */ | ||
307 | xen_set_pte(pte, mfn_pte(mfn, flags)); | ||
308 | |||
309 | /* | ||
310 | * It's enough to flush this one mapping. | ||
311 | * (PGE mappings get flushed as well) | ||
312 | */ | ||
313 | __flush_tlb_one(vaddr); | ||
314 | } | 286 | } |
315 | 287 | ||
316 | void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, | 288 | void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, |