summaryrefslogtreecommitdiff
path: root/src/cpu/intel/hyperthreading/intel_sibling.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-11-08 06:49:12 +0100
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-11-09 18:05:55 +0000
commitc8a20b9d3b8939e4b7d259c5857631c9690657de (patch)
tree42654e9d79d00b52fff07e05e364c3a7fca133e2 /src/cpu/intel/hyperthreading/intel_sibling.c
parent753827ef333cf1d4f08b017f197cc4337e980fd6 (diff)
cpu/*: Drop PARALLEL_MP leftovers
These symbols and codepaths are unused now so drop them. Change-Id: I7c46c36390f116f8f8920c06e539075e60c7118c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69361 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu/intel/hyperthreading/intel_sibling.c')
-rw-r--r--src/cpu/intel/hyperthreading/intel_sibling.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/cpu/intel/hyperthreading/intel_sibling.c b/src/cpu/intel/hyperthreading/intel_sibling.c
deleted file mode 100644
index 773d8e261c..0000000000
--- a/src/cpu/intel/hyperthreading/intel_sibling.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <console/console.h>
-#include <cpu/cpu.h>
-#include <cpu/intel/hyperthreading.h>
-#include <device/device.h>
-#include <option.h>
-
-/* Intel hyper-threading requires serialized CPU init. */
-
-static int first_time = 1;
-static int disable_siblings = !CONFIG(LOGICAL_CPUS);
-
-void intel_sibling_init(struct device *cpu)
-{
- unsigned int i, siblings;
- struct cpuid_result result;
-
- /* On the bootstrap processor see if I want sibling cpus enabled */
- if (first_time) {
- first_time = 0;
- disable_siblings = get_uint_option("hyper_threading", disable_siblings);
- }
- result = cpuid(1);
- /* Is hyperthreading supported */
- if (!(result.edx & (1 << 28)))
- return;
-
- /* See how many sibling cpus we have */
- siblings = (result.ebx >> 16) & 0xff;
- if (siblings < 1)
- siblings = 1;
-
- printk(BIOS_DEBUG, "CPU: %u %d siblings\n",
- cpu->path.apic.apic_id,
- siblings);
-
- /* See if I am a sibling cpu */
- if (cpu->path.apic.apic_id & (siblings - 1)) {
- if (disable_siblings)
- cpu->enabled = 0;
- return;
- }
-
- /* I am the primary CPU start up my siblings */
- for (i = 1; i < siblings; i++) {
- struct device_path cpu_path;
- struct device *new;
- /* Build the CPU device path */
- cpu_path.type = DEVICE_PATH_APIC;
- cpu_path.apic.apic_id = cpu->path.apic.apic_id + i;
-
- /* Allocate new CPU device structure iff sibling CPU
- * was not in static device tree.
- */
- new = alloc_find_dev(cpu->bus, &cpu_path);
-
- if (!new)
- continue;
-
- printk(BIOS_DEBUG, "CPU: %u has sibling %u\n",
- cpu->path.apic.apic_id,
- new->path.apic.apic_id);
- }
-}