diff mbox

[4/4] UBUNTU: xen: Do not call pgd_list_del in pgd_dtor for Xen

Message ID 1308750171-12578-4-git-send-email-stefan.bader@canonical.com
State New
Headers show

Commit Message

Stefan Bader June 22, 2011, 1:42 p.m. UTC
The Xen modifications add code to remove the pgd from the list as soon
as it is freed in pgd_free.

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

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

Patch

diff --git a/arch/x86/mm/pgtable_32-xen.c b/arch/x86/mm/pgtable_32-xen.c
index 49e28e7..d8bc211 100644
--- a/arch/x86/mm/pgtable_32-xen.c
+++ b/arch/x86/mm/pgtable_32-xen.c
@@ -290,15 +290,20 @@  static void pgd_ctor(void *pgd)
 
 static void pgd_dtor(void *pgd)
 {
+#ifndef CONFIG_XEN
 	unsigned long flags; /* can be called from interrupt context */
+#endif
 
 	if (SHARED_KERNEL_PMD)
 		return;
 
+#ifndef CONFIG_XEN
+	/* This is done in pgd_free in the Xen case. */
 	paravirt_release_pd(__pa(pgd) >> PAGE_SHIFT);
 	spin_lock_irqsave(&pgd_lock, flags);
 	pgd_list_del(pgd);
 	spin_unlock_irqrestore(&pgd_lock, flags);
+#endif
 
 	pgd_test_and_unpin(pgd);
 }