All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VT-d: get rid of duplicated definition
@ 2010-02-11  8:33 Han, Weidong
  0 siblings, 0 replies; only message in thread
From: Han, Weidong @ 2010-02-11  8:33 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

free_pgtable_maddr was implemented the same for x86 and IA64, so it's not necessary to define it separately for x86 and IA64. This patch moves free_pgtable_maddr definition to iommu.c to avoid duplicated definition.

Signed-off-by: Weidong Han <weidong.han@intel.com>

[-- Attachment #2: fix-dup.patch --]
[-- Type: application/octet-stream, Size: 1452 bytes --]

diff -r 53bf1bab313b xen/drivers/passthrough/vtd/ia64/vtd.c
--- a/xen/drivers/passthrough/vtd/ia64/vtd.c	Sat Feb 20 03:24:22 2010 +0800
+++ b/xen/drivers/passthrough/vtd/ia64/vtd.c	Sat Feb 20 08:26:34 2010 +0800
@@ -44,12 +44,6 @@ void unmap_vtd_domain_page(void *va)
 void unmap_vtd_domain_page(void *va)
 {
     unmap_domain_page(va);
-}
-
-void free_pgtable_maddr(u64 maddr)
-{
-    if ( maddr != 0 )
-        free_domheap_page(maddr_to_page(maddr));
 }
 
 unsigned int get_cache_line_size(void)
diff -r 53bf1bab313b xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Sat Feb 20 03:24:22 2010 +0800
+++ b/xen/drivers/passthrough/vtd/iommu.c	Sat Feb 20 08:27:01 2010 +0800
@@ -191,6 +191,12 @@ u64 alloc_pgtable_maddr(struct acpi_drhd
     }
 
     return page_to_maddr(pg);
+}
+
+void free_pgtable_maddr(u64 maddr)
+{
+    if ( maddr != 0 )
+        free_domheap_page(maddr_to_page(maddr));
 }
 
 /* context entry handling */
diff -r 53bf1bab313b xen/drivers/passthrough/vtd/x86/vtd.c
--- a/xen/drivers/passthrough/vtd/x86/vtd.c	Sat Feb 20 03:24:22 2010 +0800
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c	Sat Feb 20 08:25:20 2010 +0800
@@ -42,12 +42,6 @@ void unmap_vtd_domain_page(void *va)
 void unmap_vtd_domain_page(void *va)
 {
     unmap_domain_page(va);
-}
-
-void free_pgtable_maddr(u64 maddr)
-{
-    if ( maddr != 0 )
-        free_domheap_page(maddr_to_page(maddr));
 }
 
 unsigned int get_cache_line_size(void)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-11  8:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11  8:33 [PATCH] VT-d: get rid of duplicated definition Han, Weidong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.