summaryrefslogtreecommitdiff
path: root/src/cpu/x86/lapic
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-08 15:27:15 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-10 11:27:25 +0200
commit5c3f384f064f5c05945d561784fd7e8ef002a295 (patch)
tree11c5dbbbdf50b76999df1cee63dd40d5cf5a3c68 /src/cpu/x86/lapic
parenta7e2cc507b520583fe2e727371e431d65924ee53 (diff)
downloadcoreboot-5c3f384f064f5c05945d561784fd7e8ef002a295.tar.xz
Replace SERIAL_CPU_INIT with PARALLEL_CPU_INIT
Lines with 'select SERIAL_CPU_INIT' where redundant with the default being yes. Since there is no 'unselect SERIAL_CPU_INIT' possibility, invert the default and rename option. This squelches Kconfig warnings about unmet dependencies. Change-Id: Iae546c56006278489ebae10f2daa627af48abe94 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5700 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/cpu/x86/lapic')
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 2aef2a4bcd..09b6b9eeb0 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -406,9 +406,9 @@ void stop_this_cpu(void)
void asmlinkage secondary_cpu_init(unsigned int index)
{
atomic_inc(&active_cpus);
-#if CONFIG_SERIAL_CPU_INIT
- spin_lock(&start_cpu_lock);
-#endif
+
+ if (!IS_ENABLED(CONFIG_PARALLEL_CPU_INIT))
+ spin_lock(&start_cpu_lock);
#ifdef __SSE3__
/*
@@ -421,9 +421,9 @@ void asmlinkage secondary_cpu_init(unsigned int index)
write_cr4(cr4_val);
#endif
cpu_initialize(index);
-#if CONFIG_SERIAL_CPU_INIT
- spin_unlock(&start_cpu_lock);
-#endif
+
+ if (!IS_ENABLED(CONFIG_PARALLEL_CPU_INIT))
+ spin_unlock(&start_cpu_lock);
atomic_dec(&active_cpus);
@@ -439,11 +439,9 @@ static void start_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
if (cpu->path.type != DEVICE_PATH_APIC) {
continue;
}
- #if !CONFIG_SERIAL_CPU_INIT
- if(cpu==bsp_cpu) {
+
+ if (IS_ENABLED(CONFIG_PARALLEL_CPU_INIT) && (cpu==bsp_cpu))
continue;
- }
- #endif
if (!cpu->enabled) {
continue;
@@ -458,9 +456,9 @@ static void start_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
printk(BIOS_ERR, "CPU 0x%02x would not start!\n",
cpu->path.apic.apic_id);
}
-#if CONFIG_SERIAL_CPU_INIT
- udelay(10);
-#endif
+
+ if (!IS_ENABLED(CONFIG_PARALLEL_CPU_INIT))
+ udelay(10);
}
}
@@ -538,19 +536,17 @@ void initialize_cpus(struct bus *cpu_bus)
#endif
#if CONFIG_SMP && CONFIG_MAX_CPUS > 1
- #if !CONFIG_SERIAL_CPU_INIT
/* start all aps at first, so we can init ECC all together */
- start_other_cpus(cpu_bus, info->cpu);
- #endif
+ if (IS_ENABLED(CONFIG_PARALLEL_CPU_INIT))
+ start_other_cpus(cpu_bus, info->cpu);
#endif
/* Initialize the bootstrap processor */
cpu_initialize(0);
#if CONFIG_SMP && CONFIG_MAX_CPUS > 1
- #if CONFIG_SERIAL_CPU_INIT
- start_other_cpus(cpu_bus, info->cpu);
- #endif
+ if (!IS_ENABLED(CONFIG_PARALLEL_CPU_INIT))
+ start_other_cpus(cpu_bus, info->cpu);
/* Now wait the rest of the cpus stop*/
wait_other_cpus_stop(cpu_bus);