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 hvm: Use 'x' as parameter name for ma

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hvm: Use 'x' as parameter name for macros converting between
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Jul 2009 14:15:20 -0700
Delivery-date: Wed, 08 Jul 2009 14:16:26 -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 1247059320 -3600
# Node ID 721c14d7f60b45cd0a4ff5c57e05d2a345f180b7
# Parent  e7d4fd3346261a6c929f2ede4324c7928f6d3977
x86 hvm: Use 'x' as parameter name for macros converting between
{vcpu,domain} and {vlapic,vpic,vrtc,hpet}. Completely avoids
accidental aliasing.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hpet.c          |   10 +++++-----
 xen/arch/x86/hvm/i8254.c         |   10 +++++-----
 xen/arch/x86/hvm/rtc.c           |   10 +++++-----
 xen/arch/x86/hvm/vlapic.c        |    2 +-
 xen/include/asm-x86/hvm/vlapic.h |    7 +++----
 5 files changed, 19 insertions(+), 20 deletions(-)

diff -r e7d4fd334626 -r 721c14d7f60b xen/arch/x86/hvm/hpet.c
--- a/xen/arch/x86/hvm/hpet.c   Wed Jul 08 11:00:23 2009 +0100
+++ b/xen/arch/x86/hvm/hpet.c   Wed Jul 08 14:22:00 2009 +0100
@@ -24,11 +24,11 @@
 #include <xen/sched.h>
 #include <xen/event.h>
 
-#define domain_vhpet(d)    (&(d)->arch.hvm_domain.pl_time.vhpet)
-#define vcpu_vhpet(vcpu)   (domain_vhpet((vcpu)->domain))
-#define vhpet_domain(hpet) (container_of((hpet), struct domain, \
-                                         arch.hvm_domain.pl_time.vhpet))
-#define vhpet_vcpu(hpet)   (pt_global_vcpu_target(vhpet_domain(hpet)))
+#define domain_vhpet(x) (&(x)->arch.hvm_domain.pl_time.vhpet)
+#define vcpu_vhpet(x)   (domain_vhpet((x)->domain))
+#define vhpet_domain(x) (container_of((x), struct domain, \
+                                      arch.hvm_domain.pl_time.vhpet))
+#define vhpet_vcpu(x)   (pt_global_vcpu_target(vhpet_domain(x)))
 
 #define HPET_BASE_ADDRESS   0xfed00000ULL
 #define HPET_MMAP_SIZE      1024
diff -r e7d4fd334626 -r 721c14d7f60b xen/arch/x86/hvm/i8254.c
--- a/xen/arch/x86/hvm/i8254.c  Wed Jul 08 11:00:23 2009 +0100
+++ b/xen/arch/x86/hvm/i8254.c  Wed Jul 08 14:22:00 2009 +0100
@@ -38,11 +38,11 @@
 #include <asm/hvm/vpt.h>
 #include <asm/current.h>
 
-#define domain_vpit(d)   (&(d)->arch.hvm_domain.pl_time.vpit)
-#define vcpu_vpit(vcpu)  (domain_vpit((vcpu)->domain))
-#define vpit_domain(pit) (container_of((pit), struct domain, \
-                                       arch.hvm_domain.pl_time.vpit))
-#define vpit_vcpu(pit)   (pt_global_vcpu_target(vpit_domain(pit)))
+#define domain_vpit(x) (&(x)->arch.hvm_domain.pl_time.vpit)
+#define vcpu_vpit(x)   (domain_vpit((x)->domain))
+#define vpit_domain(x) (container_of((x), struct domain, \
+                                     arch.hvm_domain.pl_time.vpit))
+#define vpit_vcpu(x)   (pt_global_vcpu_target(vpit_domain(x)))
 
 #define RW_STATE_LSB 1
 #define RW_STATE_MSB 2
diff -r e7d4fd334626 -r 721c14d7f60b xen/arch/x86/hvm/rtc.c
--- a/xen/arch/x86/hvm/rtc.c    Wed Jul 08 11:00:23 2009 +0100
+++ b/xen/arch/x86/hvm/rtc.c    Wed Jul 08 14:22:00 2009 +0100
@@ -28,11 +28,11 @@
 #include <asm/hvm/support.h>
 #include <asm/current.h>
 
-#define domain_vrtc(d)   (&(d)->arch.hvm_domain.pl_time.vrtc)
-#define vcpu_vrtc(vcpu)  (domain_vrtc((vcpu)->domain))
-#define vrtc_domain(rtc) (container_of((rtc), struct domain, \
-                                       arch.hvm_domain.pl_time.vrtc))
-#define vrtc_vcpu(rtc)   (pt_global_vcpu_target(vrtc_domain(rtc)))
+#define domain_vrtc(x) (&(x)->arch.hvm_domain.pl_time.vrtc)
+#define vcpu_vrtc(x)   (domain_vrtc((x)->domain))
+#define vrtc_domain(x) (container_of((x), struct domain, \
+                                     arch.hvm_domain.pl_time.vrtc))
+#define vrtc_vcpu(x)   (pt_global_vcpu_target(vrtc_domain(x)))
 
 static void rtc_periodic_cb(struct vcpu *v, void *opaque)
 {
diff -r e7d4fd334626 -r 721c14d7f60b xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Wed Jul 08 11:00:23 2009 +0100
+++ b/xen/arch/x86/hvm/vlapic.c Wed Jul 08 14:22:00 2009 +0100
@@ -460,7 +460,7 @@ int vlapic_ipi(
 
     if ( delivery_mode == APIC_DM_LOWEST )
     {
-        target = apic_lowest_prio(vlapic_domain(v), lpr_map);
+        target = apic_lowest_prio(vlapic_domain(vlapic), lpr_map);
         if ( target != NULL )
             rc = vlapic_accept_irq(vlapic_vcpu(target), delivery_mode,
                                    vector, level, trig_mode);
diff -r e7d4fd334626 -r 721c14d7f60b xen/include/asm-x86/hvm/vlapic.h
--- a/xen/include/asm-x86/hvm/vlapic.h  Wed Jul 08 11:00:23 2009 +0100
+++ b/xen/include/asm-x86/hvm/vlapic.h  Wed Jul 08 14:22:00 2009 +0100
@@ -28,10 +28,9 @@
 
 #define MAX_VECTOR      256
 
-#define vcpu_vlapic(vcpu)   (&(vcpu)->arch.hvm_vcpu.vlapic)
-#define vlapic_vcpu(vpic)   (container_of((vpic), struct vcpu, \
-                                          arch.hvm_vcpu.vlapic))
-#define vlapic_domain(vpic) (vlapic_vcpu(vlapic)->domain)
+#define vcpu_vlapic(x)   (&(x)->arch.hvm_vcpu.vlapic)
+#define vlapic_vcpu(x)   (container_of((x), struct vcpu, arch.hvm_vcpu.vlapic))
+#define vlapic_domain(x) (vlapic_vcpu(x)->domain)
 
 #define VLAPIC_ID(vlapic)   \
     (GET_xAPIC_ID(vlapic_get_reg((vlapic), APIC_ID)))

_______________________________________________
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 hvm: Use 'x' as parameter name for macros converting between, Xen patchbot-unstable <=