AMD IOMMU: bug fix and code cleanup
PATCH 4/5 AMD IOMMU: bug fix and code cleanup
intr.patch: Add deallocation for interrupt remapping table.
-Wei
Signed-off-by Wei Wang <[email protected]>
Signature · 12 lines
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
xen/drivers/passthrough/amd/iommu_intr.c +16 -1
@@ -107,7 +107,7 @@ static void update_intremap_entry_from_ireturn ; } -int amd_iommu_setup_intremap_table (void ) +int __init amd_iommu_setup_intremap_table (void ) {unsigned long flags;
@@ -203,3 +203,18 @@ void amd_iommu_msi_msg_update_ire(update_intremap_entry_from_msi_msg (iommu, pdev, msg); } + +int __init deallocate_intremap_table (void ) +{ +unsigned long flags; + +spin_lock_irqsave (&int_remap_table_lock, flags); +if ( int_remap_table ) + { +free_xenheap_pages (int_remap_table,1 ); + int_remap_table =NULL ; + } +spin_unlock_irqrestore (&int_remap_table_lock, flags); + +return 0 ; +}
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel