From dd96ab698757c6b6f05612d92f38088e8f7069e5 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 15 Nov 2021 20:11:12 +0100 Subject: cpu/intel/haswell: Move chip_ops to cpu cluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cpu cluster is always present and it's the proper device to contain the settings that need to be applied to all cpus. This makes it possible to remove the fake lapic from devicetrees. Change-Id: Ic449b2df8036e8c02b5559cca6b2e7479a70a786 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/59314 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/cpu/intel/haswell/acpi.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/cpu/intel/haswell/acpi.c') diff --git a/src/cpu/intel/haswell/acpi.c b/src/cpu/intel/haswell/acpi.c index 1f028c3f3f..a53978d012 100644 --- a/src/cpu/intel/haswell/acpi.c +++ b/src/cpu/intel/haswell/acpi.c @@ -164,28 +164,22 @@ static void generate_T_state_entries(int core, int cores_per_package) ARRAY_SIZE(tss_table_coarse), tss_table_coarse); } -static bool is_s0ix_enabled(void) +static bool is_s0ix_enabled(const struct device *dev) { if (!haswell_is_ult()) return false; - const struct device *lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC); - - if (!lapic || !lapic->chip_info) - return false; - - const struct cpu_intel_haswell_config *conf = lapic->chip_info; - + const struct cpu_intel_haswell_config *conf = dev->chip_info; return conf->s0ix_enable; } -static void generate_C_state_entries(void) +static void generate_C_state_entries(const struct device *dev) { acpi_cstate_t acpi_cstate_map[3] = {0}; const int *acpi_cstates; - if (is_s0ix_enabled()) + if (is_s0ix_enabled(dev)) acpi_cstates = cstate_set_s0ix; else if (haswell_is_ult()) acpi_cstates = cstate_set_lp; @@ -352,7 +346,7 @@ void generate_cpu_entries(const struct device *device) coreID - 1, cores_per_package); /* Generate C-state tables */ - generate_C_state_entries(); + generate_C_state_entries(device); /* Generate T-state tables */ generate_T_state_entries( -- cgit v1.2.3