From 79e7ca307e0bb05a967652a54206d96d023c9231 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 17 Nov 2014 00:17:06 -0800 Subject: [PATCH] x86: APIC: Fix the getRegArrayBit function. The getRegArrayBit function extracts a bit from a series of registers which are treated as a single large bit array. A previous change had modified the logic which figured out which bit to extract from ">> 5" to "% 5" which seems wrong, especially when other, similar functions were changed to use "% 32". --- src/arch/x86/interrupts.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh index dabee5441..b584c234b 100644 --- a/src/arch/x86/interrupts.hh +++ b/src/arch/x86/interrupts.hh @@ -180,7 +180,7 @@ class Interrupts : public BasicPioDevice, IntDevice bool getRegArrayBit(ApicRegIndex base, uint8_t vector) { - return bits(regs[base + (vector / 32)], vector % 5); + return bits(regs[base + (vector / 32)], vector % 32); } void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level); -- 2.30.2