]> xenbits.xensource.com Git - xen.git/commitdiff
x86: drop MAX_VECTOR definition
authorJan Beulich <jbeulich@suse.com>
Thu, 4 Jul 2013 08:25:31 +0000 (10:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 4 Jul 2013 08:25:31 +0000 (10:25 +0200)
.. in favor of NR_VECTORS, as being redundant and as the latter is
correct in terms of its naming, while the former is off by one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vlapic.c
xen/include/asm-x86/hvm/vlapic.h

index 7dea8fbc93f349dbd71fcfafdf4bd6e845ad66f6..e039ed09452a747f548b7f36ee761461e866ea73 100644 (file)
@@ -90,10 +90,10 @@ static const unsigned int vlapic_lvt_mask[VLAPIC_LVT_NUM] =
     ((vlapic_get_reg(vlapic, APIC_LVTT) & APIC_TIMER_MODE_MASK) \
      == APIC_TIMER_MODE_TSC_DEADLINE)
 
-static int vlapic_find_highest_vector(void *bitmap)
+static int vlapic_find_highest_vector(const void *bitmap)
 {
-    uint32_t *word = bitmap;
-    int word_offset = MAX_VECTOR / 32;
+    const uint32_t *word = bitmap;
+    unsigned int word_offset = NR_VECTORS / 32;
 
     /* Work backwards through the bitmap (first 32-bit word in every four). */
     while ( (word_offset != 0) && (word[(--word_offset)*4] == 0) )
index 3277125a4becf981d7eeaed077b07ce0137bed0b..021a5f278fa4302bf5d65923b454caac29c136ed 100644 (file)
@@ -26,8 +26,6 @@
 #include <public/hvm/ioreq.h>
 #include <asm/hvm/vpt.h>
 
-#define MAX_VECTOR      256
-
 #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)