This allows for marginally better code generation including the use of BT
rather than SHR/TEST.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
}
}
-static inline bool apic_isr_read(uint8_t vector)
+static inline bool apic_isr_read(unsigned int vector)
{
- return (apic_read(APIC_ISR + ((vector & ~0x1f) >> 1)) >>
- (vector & 0x1f)) & 1;
+ return apic_read(APIC_ISR + (vector / 32 * 0x10)) & (1U << (vector % 32));
}
static inline bool apic_tmr_read(unsigned int vector)