aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-07-04 10:25:31 +0200
committerJan Beulich <jbeulich@suse.com>2013-07-04 10:25:31 +0200
commit966e77e9d6855274954d2d38eca2393121da477d (patch)
treec7ea6bdee6ff50d7a4327007a4f414ac06b1d757 /xen/arch/x86/hvm
parentda72c56322c012f67aad79ca6093a5f21a0a3395 (diff)
downloadxen-966e77e9d6855274954d2d38eca2393121da477d.tar.gz
xen-966e77e9d6855274954d2d38eca2393121da477d.tar.bz2
xen-966e77e9d6855274954d2d38eca2393121da477d.zip
x86: drop MAX_VECTOR definition
.. 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>
Diffstat (limited to 'xen/arch/x86/hvm')
-rw-r--r--xen/arch/x86/hvm/vlapic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index 7dea8fbc93..e039ed0945 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -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) )