Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   UBUNTU: xen: xen_destroy_contiguous_region only needed in unshared case (http://www.linux-archive.org/ubuntu-kernel-team/542818-ubuntu-xen-xen_destroy_contiguous_region-only-needed-unshared-case.html)

Stefan Bader 06-22-2011 01:42 PM

UBUNTU: xen: xen_destroy_contiguous_region only needed in unshared case
 
The call to create is only done for !SHARED_KERNEL_PMD, so only destroy
in that case (also this is only useful when CONFIG_XEN is set.

BugLink: http://bugs.launchpad.net/bugs/705562

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/x86/mm/pgtable_32-xen.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/pgtable_32-xen.c b/arch/x86/mm/pgtable_32-xen.c
index 48242aa..49e28e7 100644
--- a/arch/x86/mm/pgtable_32-xen.c
+++ b/arch/x86/mm/pgtable_32-xen.c
@@ -473,8 +473,12 @@ void pgd_free(pgd_t *pgd)
pmd_cache_free(pmd, i);
}

- if (!xen_feature(XENFEAT_pae_pgdir_above_4gb))
- xen_destroy_contiguous_region((unsigned long)pgd, 0);
+#ifdef CONFIG_XEN
+ if (!SHARED_KERNEL_PMD)
+ if (!xen_feature(XENFEAT_pae_pgdir_above_4gb))
+ xen_destroy_contiguous_region(
+ (unsigned long)pgd, 0);
+#endif
}

/* in the non-PAE case, free_pgtables() clears user pgd entries */
--
1.7.4.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 09:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.