Julian Stecklina has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/58097 )
Change subject: *x86: remove lapic_read_around ......................................................................
*x86: remove lapic_read_around
This macro has been a plain wrapper around lapic_read for a long time and there seems to be no discernable reason to have a different variant of lapic_read.
This commit carries no functional change.
Change-Id: Ib2d2e9054be65a8a061306db2a3b77f56f764f82 Signed-off-by: Julian Stecklina julian.stecklina@cyberus-technology.de --- M src/cpu/x86/lapic/lapic.c M src/cpu/x86/lapic/lapic_cpu_init.c M src/include/cpu/x86/lapic.h 3 files changed, 6 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/58097/1
diff --git a/src/cpu/x86/lapic/lapic.c b/src/cpu/x86/lapic/lapic.c index a5b4cd5..db4a959 100644 --- a/src/cpu/x86/lapic/lapic.c +++ b/src/cpu/x86/lapic/lapic.c @@ -22,14 +22,14 @@ * Set Task Priority to 'accept all'. */ lapic_write_around(LAPIC_TASKPRI, - lapic_read_around(LAPIC_TASKPRI) & ~LAPIC_TPRI_MASK); + lapic_read(LAPIC_TASKPRI) & ~LAPIC_TPRI_MASK);
/* Put the local APIC in virtual wire mode */ lapic_write_around(LAPIC_SPIV, - (lapic_read_around(LAPIC_SPIV) & ~(LAPIC_VECTOR_MASK)) + (lapic_read(LAPIC_SPIV) & ~(LAPIC_VECTOR_MASK)) | LAPIC_SPIV_ENABLE); lapic_write_around(LAPIC_LVT0, - (lapic_read_around(LAPIC_LVT0) & + (lapic_read(LAPIC_LVT0) & ~(LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER | LAPIC_LVT_REMOTE_IRR | LAPIC_INPUT_POLARITY | LAPIC_SEND_PENDING | LAPIC_LVT_RESERVED_1 | @@ -38,7 +38,7 @@ LAPIC_DELIVERY_MODE_EXTINT) ); lapic_write_around(LAPIC_LVT1, - (lapic_read_around(LAPIC_LVT1) & + (lapic_read(LAPIC_LVT1) & ~(LAPIC_LVT_MASKED | LAPIC_LVT_LEVEL_TRIGGER | LAPIC_LVT_REMOTE_IRR | LAPIC_INPUT_POLARITY | LAPIC_SEND_PENDING | LAPIC_LVT_RESERVED_1 | diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c index f89d9e3..122d2ff 100644 --- a/src/cpu/x86/lapic/lapic_cpu_init.c +++ b/src/cpu/x86/lapic/lapic_cpu_init.c @@ -165,7 +165,7 @@
for (j = 1; j <= CONFIG_NUM_IPI_STARTS; j++) { printk(BIOS_SPEW, "Sending STARTUP #%d to %lu.\n", j, apicid); - lapic_read_around(LAPIC_SPIV); + lapic_read(LAPIC_SPIV); lapic_write(LAPIC_ESR, 0); lapic_read(LAPIC_ESR); printk(BIOS_SPEW, "After apic_write.\n"); @@ -205,7 +205,7 @@ * Due to the Pentium erratum 3AP. */ if (maxlvt > 3) { - lapic_read_around(LAPIC_SPIV); + lapic_read(LAPIC_SPIV); lapic_write(LAPIC_ESR, 0); } accept_status = (lapic_read(LAPIC_ESR) & 0xEF); diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h index 717fc9a..a548919 100644 --- a/src/include/cpu/x86/lapic.h +++ b/src/include/cpu/x86/lapic.h @@ -120,7 +120,6 @@ : : "memory", "cc"); }
-# define lapic_read_around(x) lapic_read(x) # define lapic_write_around(x, y) lapic_write_atomic((x), (y))
void lapic_virtual_wire_mode_init(void);