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] VT-d: remove useless variables

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] VT-d: remove useless variables
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 05 Jun 2009 19:15:17 -0700
Delivery-date: Fri, 05 Jun 2009 19:15:23 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1244190399 -3600
# Node ID 931dbe86e5f37d5eb89e7383098f04b934475c48
# Parent  01748ccc4da396da6977f8d5170de1b1ac2ba96b
VT-d: remove useless variables

This patch removes global variable "vtd_enabled", which is
redundant. "iommu_enabled" is enough. And also removes useless global
variables qi_ctrl and ir_ctrl, which are not used at all.

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
---
 xen/arch/x86/msi.c                    |    2 +-
 xen/drivers/passthrough/vtd/dmar.c    |    4 +---
 xen/drivers/passthrough/vtd/extern.h  |    2 --
 xen/drivers/passthrough/vtd/iommu.c   |    8 ++++----
 xen/drivers/passthrough/vtd/utils.c   |    2 +-
 xen/drivers/passthrough/vtd/x86/vtd.c |    2 +-
 xen/include/xen/iommu.h               |    1 -
 7 files changed, 8 insertions(+), 13 deletions(-)

diff -r 01748ccc4da3 -r 931dbe86e5f3 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Fri Jun 05 09:25:50 2009 +0100
+++ b/xen/arch/x86/msi.c        Fri Jun 05 09:26:39 2009 +0100
@@ -191,7 +191,7 @@ static void read_msi_msg(struct msi_desc
         BUG();
     }
 
-    if ( vtd_enabled )
+    if ( iommu_enabled )
         msi_msg_read_remap_rte(entry, msg);
 }
 
diff -r 01748ccc4da3 -r 931dbe86e5f3 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c        Fri Jun 05 09:25:50 2009 +0100
+++ b/xen/drivers/passthrough/vtd/dmar.c        Fri Jun 05 09:26:39 2009 +0100
@@ -32,8 +32,6 @@
 #include "dmar.h"
 #include "iommu.h"
 
-int vtd_enabled = 1;
-
 #undef PREFIX
 #define PREFIX VTDPREFIX "ACPI DMAR:"
 #define DEBUG
@@ -561,6 +559,6 @@ int acpi_dmar_init(void)
         panic("acpi_dmar_init: acpi_dmar_init failed,"
               " crash Xen for security purpose!\n");
 
-    vtd_enabled = 0;
+    iommu_enabled = 0;
     return -ENODEV;
 }
diff -r 01748ccc4da3 -r 931dbe86e5f3 xen/drivers/passthrough/vtd/extern.h
--- a/xen/drivers/passthrough/vtd/extern.h      Fri Jun 05 09:25:50 2009 +0100
+++ b/xen/drivers/passthrough/vtd/extern.h      Fri Jun 05 09:26:39 2009 +0100
@@ -25,8 +25,6 @@
 
 extern int qinval_enabled;
 extern int ats_enabled;
-extern struct qi_ctrl *qi_ctrl;
-extern struct ir_ctrl *ir_ctrl;
 
 void print_iommu_regs(struct acpi_drhd_unit *drhd);
 void print_vtd_entries(struct iommu *iommu, int bus, int devfn, u64 gmfn);
diff -r 01748ccc4da3 -r 931dbe86e5f3 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Fri Jun 05 09:25:50 2009 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Fri Jun 05 09:26:39 2009 +0100
@@ -1790,7 +1790,7 @@ int intel_vtd_setup(void)
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
 
-    if ( !vtd_enabled )
+    if ( !iommu_enabled )
         return -ENODEV;
 
     platform_quirks();
@@ -1859,7 +1859,7 @@ int intel_vtd_setup(void)
  error:
     for_each_drhd_unit ( drhd )
         iommu_free(drhd);
-    vtd_enabled = 0;
+    iommu_enabled = 0;
     iommu_snoop = 0;
     iommu_passthrough = 0;
     iommu_qinval = 0;
@@ -1955,7 +1955,7 @@ void iommu_suspend(void)
     struct iommu *iommu;
     u32    i;
 
-    if ( !vtd_enabled )
+    if ( !iommu_enabled )
         return;
 
     iommu_flush_all();
@@ -1991,7 +1991,7 @@ void iommu_resume(void)
     struct iommu_flush *flush;
     u32 i;
 
-    if ( !vtd_enabled )
+    if ( !iommu_enabled )
         return;
 
     /* Re-initialize the register-based flush functions.
diff -r 01748ccc4da3 -r 931dbe86e5f3 xen/drivers/passthrough/vtd/utils.c
--- a/xen/drivers/passthrough/vtd/utils.c       Fri Jun 05 09:25:50 2009 +0100
+++ b/xen/drivers/passthrough/vtd/utils.c       Fri Jun 05 09:26:39 2009 +0100
@@ -260,7 +260,7 @@ void dump_iommu_info(unsigned char key)
     }
 
     /* Dump the I/O xAPIC redirection table(s). */
-    if ( vtd_enabled )
+    if ( iommu_enabled )
     {
         int apic, reg;
         union IO_APIC_reg_01 reg_01;
diff -r 01748ccc4da3 -r 931dbe86e5f3 xen/drivers/passthrough/vtd/x86/vtd.c
--- a/xen/drivers/passthrough/vtd/x86/vtd.c     Fri Jun 05 09:25:50 2009 +0100
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c     Fri Jun 05 09:26:39 2009 +0100
@@ -117,7 +117,7 @@ void hvm_dpci_isairq_eoi(struct domain *
     int i;
 
     ASSERT(isairq < NR_ISAIRQS);
-    if ( !vtd_enabled)
+    if ( !iommu_enabled)
         return;
 
     spin_lock(&d->event_lock);
diff -r 01748ccc4da3 -r 931dbe86e5f3 xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h   Fri Jun 05 09:25:50 2009 +0100
+++ b/xen/include/xen/iommu.h   Fri Jun 05 09:26:39 2009 +0100
@@ -26,7 +26,6 @@
 #include <public/hvm/ioreq.h>
 #include <public/domctl.h>
 
-extern int vtd_enabled;
 extern int iommu_enabled;
 extern int iommu_pv_enabled;
 extern int force_iommu;

_______________________________________________
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] VT-d: remove useless variables, Xen patchbot-unstable <=