summaryrefslogtreecommitdiff
path: root/src/cpu/x86/lapic
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-05-21 09:32:45 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-10 17:49:16 +0000
commita4ceba4ae57d03db1e779794d29b9e0b93c39377 (patch)
treea8ec94cca94ba1149c75ab3afc695e1fe879edb5 /src/cpu/x86/lapic
parent6f77ff7ba50c88100934e30576f1c56f164ac8de (diff)
cpu/x86/lapic: Add lapic_busy() helper
Change-Id: Ife127d6dc8241cccb9d52236a9152da707f0e261 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55191 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu/x86/lapic')
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 6369d2e302..e870921774 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -110,7 +110,7 @@ static int lapic_start_cpu(unsigned long apicid)
do {
printk(BIOS_SPEW, "+");
udelay(100);
- send_status = lapic_read(LAPIC_ICR) & LAPIC_ICR_BUSY;
+ send_status = lapic_busy();
} while (send_status && (timeout++ < 1000));
if (timeout >= 1000) {
printk(BIOS_ERR, "CPU %ld: First APIC write timed out. "
@@ -136,7 +136,7 @@ static int lapic_start_cpu(unsigned long apicid)
do {
printk(BIOS_SPEW, "+");
udelay(100);
- send_status = lapic_read(LAPIC_ICR) & LAPIC_ICR_BUSY;
+ send_status = lapic_busy();
} while (send_status && (timeout++ < 1000));
if (timeout >= 1000) {
printk(BIOS_ERR, "CPU %ld: Second APIC write timed out. "
@@ -177,7 +177,7 @@ static int lapic_start_cpu(unsigned long apicid)
do {
printk(BIOS_SPEW, "+");
udelay(100);
- send_status = lapic_read(LAPIC_ICR) & LAPIC_ICR_BUSY;
+ send_status = lapic_busy();
} while (send_status && (timeout++ < 1000));
/*
@@ -330,7 +330,7 @@ void stop_this_cpu(void)
do {
dprintk(BIOS_SPEW, "+");
udelay(100);
- send_status = lapic_read(LAPIC_ICR) & LAPIC_ICR_BUSY;
+ send_status = lapic_busy();
} while (send_status && (timeout++ < 1000));
if (timeout >= 1000)
@@ -349,7 +349,7 @@ void stop_this_cpu(void)
do {
dprintk(BIOS_SPEW, "+");
udelay(100);
- send_status = lapic_read(LAPIC_ICR) & LAPIC_ICR_BUSY;
+ send_status = lapic_busy();
} while (send_status && (timeout++ < 1000));
if (timeout >= 1000)