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-devel

RE: [Xen-devel] [PATCH 1/5] AMD IOMMU: bug fix and code cleanup

To: Wei Wang2 <wei.wang2@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 1/5] AMD IOMMU: bug fix and code cleanup
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Thu, 31 Jul 2008 06:25:42 -0700
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 31 Jul 2008 06:26:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1217507265.27350.121.camel@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1217507265.27350.121.camel@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjzCU1xJ22ysd/wSC6XF/WentNqBQABmF5g
Thread-topic: [Xen-devel] [PATCH 1/5] AMD IOMMU: bug fix and code cleanup
On 7/31/2008 5:27:45 AM, Wei Wang2 wrote:
> init.patch: Since device id covered by each iommu can never overlap,
> use a global device table instead of allocating private tables for
> each iommu. Migrate a few functions from pci_amd_iommu.c
>
> -Wei

+void __init enable_iommu(struct amd_iommu *iommu)
+{
+    unsigned long flags;
+
     spin_lock_irqsave(&iommu->lock, flags);

-    amd_iommu_msi_data_init (iommu, vector);
+    if ( iommu->enabled )
+        return;

I just scanned the code for a second, but you might want to add
spin_unlock_irqrestore(&iommu->lock, flags) before returning?


>
> Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
> --
> AMD Saxony, Dresden, Germany
> Operating System Research Center
>
> Legal Information:
> AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift):
> Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht
> Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC
> (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr.
> Hans-R. Deppe, Thomas McCoy
             .
Jun Nakajima | Intel Open Source Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>