WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86-64/mmcfg: fix pci_mmcfg_arch_free()

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86-64/mmcfg: fix pci_mmcfg_arch_free()
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 08 Jul 2011 06:22:29 +0100
Delivery-date: Thu, 07 Jul 2011 22:28:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1309549461 -3600
# Node ID 897ce4a983c1e60574ab0803ce37a7d331ae7ff8
# Parent  1b9cce28cab754b8cc0a7951e15a34768c90402e
x86-64/mmcfg: fix pci_mmcfg_arch_free()

While only used on error paths so far, it should still actually do
something (which iounmap(), being an empty stub, doesn't).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---


diff -r 1b9cce28cab7 -r 897ce4a983c1 xen/arch/x86/x86_64/mmconfig_64.c
--- a/xen/arch/x86/x86_64/mmconfig_64.c Fri Jul 01 20:43:55 2011 +0100
+++ b/xen/arch/x86/x86_64/mmconfig_64.c Fri Jul 01 20:44:21 2011 +0100
@@ -166,7 +166,12 @@
 
     for (i = 0; i < pci_mmcfg_config_num; ++i) {
         if (pci_mmcfg_virt[i].virt) {
-            iounmap(pci_mmcfg_virt[i].virt);
+            unsigned long size;
+            const struct acpi_mcfg_allocation *cfg = pci_mmcfg_virt[i].cfg;
+
+            size = (cfg->end_bus_number - cfg->start_bus_number + 1) << 20;
+            destroy_xen_mappings((unsigned long)pci_mmcfg_virt[i].virt,
+                                 (unsigned long)pci_mmcfg_virt[i].virt + size);
             pci_mmcfg_virt[i].virt = NULL;
             pci_mmcfg_virt[i].cfg = NULL;
         }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86-64/mmcfg: fix pci_mmcfg_arch_free(), Xen patchbot-unstable <=