Skip to content

Commit

Permalink
apic: no delivery status flag in ICR for X2APIC
Browse files Browse the repository at this point in the history
In X2APIC mode there is no delivery status flag in ICR,
hence there is no need to read ICR at all.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel authored and dkgupta-amzn committed Nov 24, 2020
1 parent 000838f commit 4a4dea6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/arch/x86/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,12 @@ static inline void *apic_get_base(apic_base_t apic_base) {
}

static inline void apic_wait_ready(void) {
apic_mode_t mode = apic_get_mode();
apic_icr_t icr;

if (mode == APIC_MODE_X2APIC)
return;

do {
icr = apic_icr_read();
if (icr.deliv_status == APIC_DELIV_STATUS_IDLE)
Expand Down

0 comments on commit 4a4dea6

Please sign in to comment.