Magellan Linux

Contents of /tags/kernel26-xen-2_6_25_r1-fedora9-patches/kernel26-xen/patches-2.6.25-r1/1136-2.6.25-xen-Use-un-pin_page-when-un-pinning-pgd.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 608 - (show annotations) (download)
Fri May 23 12:17:32 2008 UTC (16 years, 1 month ago) by (unknown author)
File size: 1187 byte(s)
This commit was manufactured by cvs2svn to create tag
'kernel26-xen-2_6_25_r1-fedora9-patches'.
1 From 56ac2b74702fbd725b2e4c51c0f9c2b653bacdbd Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@redhat.com>
3 Date: Wed, 13 Feb 2008 13:24:31 -0200
4 Subject: [PATCH] Use (un)pin_page() when (un)pinning pgd
5
6 This will check the PG_pinned flag, so we avoid unpinning or pinning
7 pages twice.
8
9 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
10 ---
11 arch/x86/xen/mmu.c | 6 +++---
12 1 files changed, 3 insertions(+), 3 deletions(-)
13
14 diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
15 index 3718523..11a4543 100644
16 --- a/arch/x86/xen/mmu.c
17 +++ b/arch/x86/xen/mmu.c
18 @@ -525,7 +525,7 @@ void xen_pgd_pin(pgd_t *pgd)
19 level = MMUEXT_PIN_L2_TABLE;
20 #endif
21
22 - xen_do_pin(level, PFN_DOWN(__pa(pgd)));
23 + pin_page(virt_to_page(pgd), PT_PGD);
24
25 xen_mc_issue(0);
26 }
27 @@ -591,9 +591,9 @@ void xen_pgd_unpin(pgd_t *pgd)
28 xen_mc_batch();
29
30 #ifdef CONFIG_X86_64
31 - xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(__user_pgd(pgd))));
32 + unpin_page(virt_to_page(__user_pgd(pgd)), PT_PGD);
33 #endif
34 - xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd)));
35 + unpin_page(virt_to_page(pgd), PT_PGD);
36
37 #ifdef CONFIG_X86_64
38 pgd_walk(PARENT_FIRST, __user_pgd(pgd), unpin_page, 0, TASK_SIZE);
39 --
40 1.5.4.1
41