From 5a996ce6a983462f50c6ad3e664ea80240398f3b Mon Sep 17 00:00:00 2001 From: "Yan, Like" Date: Wed, 12 Sep 2018 09:49:11 +0800 Subject: [PATCH] hv:irq: correct the size of irq_alloc_bitmap This commit corrected the size of irq_alloc_bitmap[]. Tracked-On: #1229 Signed-off-by: Yan, Like --- hypervisor/arch/x86/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/irq.c b/hypervisor/arch/x86/irq.c index 841b25c23..740d186fd 100644 --- a/hypervisor/arch/x86/irq.c +++ b/hypervisor/arch/x86/irq.c @@ -10,7 +10,7 @@ static spinlock_t exception_spinlock = { .head = 0U, .tail = 0U, }; static spinlock_t irq_alloc_spinlock = { .head = 0U, .tail = 0U, }; -#define IRQ_ALLOC_BITMAP_SIZE INT_DIV_ROUNDUP(NR_IRQS, sizeof(uint64_t)) +#define IRQ_ALLOC_BITMAP_SIZE INT_DIV_ROUNDUP(NR_IRQS, 64U) static uint64_t irq_alloc_bitmap[IRQ_ALLOC_BITMAP_SIZE]; static struct irq_desc irq_desc_array[NR_IRQS]; static uint32_t vector_to_irq[NR_MAX_VECTOR + 1];