From patchwork Wed Jun 22 13:42:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 101471 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id E0E1FB6FB7 for ; Wed, 22 Jun 2011 23:43:02 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QZNhq-000485-C5; Wed, 22 Jun 2011 13:42:58 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QZNhn-00046T-GB for kernel-team@lists.ubuntu.com; Wed, 22 Jun 2011 13:42:55 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QZNhn-0002kS-C6 for ; Wed, 22 Jun 2011 13:42:55 +0000 Received: from p5b2e55c3.dip.t-dialin.net ([91.46.85.195] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1QZNhn-0005RM-7r for kernel-team@lists.ubuntu.com; Wed, 22 Jun 2011 13:42:55 +0000 From: Stefan Bader To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/4] UBUNTU: xen: Do not call pgd_list_del in pgd_dtor for Xen Date: Wed, 22 Jun 2011 15:42:51 +0200 Message-Id: <1308750171-12578-4-git-send-email-stefan.bader@canonical.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308750171-12578-1-git-send-email-stefan.bader@canonical.com> References: <20110622083557.GJ31152@shadowen.org> <1308750171-12578-1-git-send-email-stefan.bader@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com 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 --- arch/x86/mm/pgtable_32-xen.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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); }