soc/intel/denverton_ns: use mp_cpu_bus_init

After adding the functionality to add a bus/link on the CPU cluster
device in mp_cpu_bus_init if it is missing due to no LAPIC device being
present in the devicetree below the CPU cluster device, we can use
mp_cpu_bus_init as init function in cpu_bus_ops and implement
mp_init_cpus.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I76aebeca1b3227cfd310b6c45f506c042b35ae04
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Felix Held 2021-10-21 02:13:36 +02:00 committed by Felix Held
parent 60e9114c62
commit af2da55876
4 changed files with 3 additions and 18 deletions

View File

@ -27,7 +27,7 @@ static struct device_operations pci_domain_ops = {
static struct device_operations cpu_bus_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.init = denverton_init_cpus,
.init = mp_cpu_bus_init,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_fill_ssdt = generate_cpu_entries,
#endif

View File

@ -286,17 +286,9 @@ static const struct mp_ops mp_ops = {
.post_mp_init = post_mp_init,
};
void denverton_init_cpus(struct device *dev)
void mp_init_cpus(struct bus *cpu_bus)
{
/*
* Ensure there is at least one bus downstream to the CPU device. If not, then create a
* new link. This can occur if the mainboard does not add any APIC device in the device
* tree.
*/
if (!dev->link_list)
add_more_links(dev, 1);
/* Clear for take-off */
/* TODO: Handle mp_init_with_smm failure? */
mp_init_with_smm(dev->link_list, &mp_ops);
mp_init_with_smm(cpu_bus, &mp_ops);
}

View File

@ -7,12 +7,6 @@
int get_cpu_count(void);
#ifndef __ASSEMBLER__
#include <device/device.h>
void denverton_init_cpus(struct device *dev);
#endif
/* Everything below this line is ignored in the DSDT */
#ifndef __ACPI__

View File

@ -8,7 +8,6 @@
#include <fsp/util.h>
#include <memory_info.h>
void denverton_init_cpus(struct device *dev);
void mainboard_silicon_init_params(FSPS_UPD *params);
void southcluster_enable_dev(struct device *dev);
void mainboard_add_dimm_info(struct memory_info *mem_info, int channel,