# 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
|