|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/APIC: Rewrite apic_isr_read() to match apic_{tmr,irr}_read()
commit 5795a0bf5493d411155093180ed16e4ba63d37bf
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Jul 23 20:21:02 2024 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Jul 24 12:18:44 2024 +0100
x86/APIC: Rewrite apic_isr_read() to match apic_{tmr,irr}_read()
This allows for marginally better code generation including the use of BT
rather than SHR/TEST.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/include/asm/apic.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h
index 509a6683a1..a7798de029 100644
--- a/xen/arch/x86/include/asm/apic.h
+++ b/xen/arch/x86/include/asm/apic.h
@@ -126,10 +126,9 @@ static inline void apic_icr_write(u32 low, u32 dest)
}
}
-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)
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |