From 3139c8dc05a363810b4dd9c45f01667760e22a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 28 Jun 2020 16:33:33 +0300 Subject: ACPI: Drop redundant CBMEM_ID_ACPI_GNVS allocations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allocation now happens prior to device enumeration. The step cbmem_add() is a no-op here, if reached for some boards. The memset() here is also redundant and becomes harmful with followup works, as it would wipe out the CBMEM console and ChromeOS related fields without them being set again. Change-Id: I9b2625af15cae90b9c1eb601e606d0430336609f Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/48701 Reviewed-by: Lance Zhao Reviewed-by: Angel Pons Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/soc/intel/common/Kconfig.common | 1 + src/soc/intel/common/block/acpi/acpi.c | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/Kconfig.common b/src/soc/intel/common/Kconfig.common index b0fbf25545..f39571ee44 100644 --- a/src/soc/intel/common/Kconfig.common +++ b/src/soc/intel/common/Kconfig.common @@ -2,6 +2,7 @@ config SOC_INTEL_COMMON bool select AZALIA_PLUGIN_SUPPORT select HAVE_DISPLAY_MTRRS + select ACPI_SOC_NVS help common code for Intel SOCs diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c index 4a53c55902..fc4352834a 100644 --- a/src/soc/intel/common/block/acpi/acpi.c +++ b/src/soc/intel/common/block/acpi/acpi.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include #include #include @@ -7,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -244,11 +244,6 @@ void southbridge_inject_dsdt(const struct device *device) struct global_nvs *gnvs; gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); - if (!gnvs) { - gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs)); - if (gnvs) - memset(gnvs, 0, sizeof(*gnvs)); - } if (gnvs) { acpi_create_gnvs(gnvs); -- cgit v1.2.3