summaryrefslogtreecommitdiff
path: root/src/arch/x86/interrupts.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/interrupts.hh')
-rw-r--r--src/arch/x86/interrupts.hh6
1 files 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);