From 089b3840865f816493a33f2ccf987307d0a79f87 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 19 Apr 2009 13:47:15 -0700 Subject: [PATCH] X86: Fix the functions that manipulate large bit arrays in the local APIC. --- src/arch/x86/interrupts.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh index 1f3a414ce..72a852ada 100644 --- a/src/arch/x86/interrupts.hh +++ b/src/arch/x86/interrupts.hh @@ -172,19 +172,19 @@ class Interrupts : public BasicPioDevice, IntDev void setRegArrayBit(ApicRegIndex base, uint8_t vector) { - regs[base + (vector % 32)] |= (1 << (vector >> 5)); + regs[base + (vector / 32)] |= (1 << (vector % 32)); } void clearRegArrayBit(ApicRegIndex base, uint8_t vector) { - regs[base + (vector % 32)] &= ~(1 << (vector >> 5)); + regs[base + (vector / 32)] &= ~(1 << (vector % 32)); } bool getRegArrayBit(ApicRegIndex base, uint8_t vector) { - return bits(regs[base + (vector % 32)], vector >> 5); + return bits(regs[base + (vector / 32)], vector % 5); } void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level); -- 2.30.2