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: Clean ups and fixes after bitops cha

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Clean ups and fixes after bitops changes.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:40:18 -0700
Delivery-date: Thu, 20 Mar 2008 05:41:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1205837480 0
# Node ID 12b589420bd147dd078e73043d8b2e264b923d2c
# Parent  9b0ee101c2e2940e52c14ed8c652f18b8b816fb3
x86: Clean ups and fixes after bitops changes.

Firstly, the vlapic bitops need fewer casts.

Secondly, the minimum-alignment check is unnecessary and also breaks
the build (page_info's type_info field has alignment == 1). It is an
unnecessary check because bitops operate on only one bit of the word
they access, so lack of atomicity of the read and writeback does not
matter -- furthermore the LOCKed variants are guaranteed atomic
regardless of alignment.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vlapic.c    |    6 ++----
 xen/include/asm-x86/bitops.h |    2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff -r 9b0ee101c2e2 -r 12b589420bd1 xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Tue Mar 18 10:05:56 2008 +0000
+++ b/xen/arch/x86/hvm/vlapic.c Tue Mar 18 10:51:20 2008 +0000
@@ -114,14 +114,12 @@ static int vlapic_find_highest_vector(vo
 
 static int vlapic_test_and_set_irr(int vector, struct vlapic *vlapic)
 {
-    return vlapic_test_and_set_vector(
-        vector, (unsigned long *)&vlapic->regs->data[APIC_IRR]);
+    return vlapic_test_and_set_vector(vector, &vlapic->regs->data[APIC_IRR]);
 }
 
 static void vlapic_clear_irr(int vector, struct vlapic *vlapic)
 {
-    vlapic_clear_vector(
-        vector, (unsigned long *)&vlapic->regs->data[APIC_IRR]);
+    vlapic_clear_vector(vector, &vlapic->regs->data[APIC_IRR]);
 }
 
 static int vlapic_find_highest_irr(struct vlapic *vlapic)
diff -r 9b0ee101c2e2 -r 12b589420bd1 xen/include/asm-x86/bitops.h
--- a/xen/include/asm-x86/bitops.h      Tue Mar 18 10:05:56 2008 +0000
+++ b/xen/include/asm-x86/bitops.h      Tue Mar 18 10:51:20 2008 +0000
@@ -26,7 +26,7 @@
 #define CONST_ADDR (*(const volatile long *) addr)
 
 extern void __bitop_bad_size(void);
-#define bitop_bad_size(addr) (min(sizeof(*(addr)), __alignof__(*(addr))) < 4)
+#define bitop_bad_size(addr) (sizeof(*(addr)) < 4)
 
 /**
  * set_bit - Atomically set a bit in memory

_______________________________________________
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: Clean ups and fixes after bitops changes., Xen patchbot-unstable <=