summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-10-17 13:28:23 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-10-19 14:57:59 +0000
commite9f10ff38bf95000115d7c0a45cb0e6323cc61c8 (patch)
tree4c3b9a458637b78ce64447dab386cecc156438e2 /src/soc/intel/common
parentd2794cea1291f7f6e35b426b8b66cbb08da6d532 (diff)
soc/intel: Constify `soc_get_cstate_map()`
Return a read-only pointer from the `soc_get_cstate_map()` function. Also, constify the actual data where applicable. Change-Id: I7d46f1e373971c789eaf1eb582e9aa2d3f661785 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58392 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/block/acpi/acpi.c2
-rw-r--r--src/soc/intel/common/block/include/intelblocks/acpi.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c
index f144a6d5fa..af7212e70e 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -248,7 +248,7 @@ int common_calculate_power_ratio(int tdp, int p1_ratio, int ratio)
static void generate_c_state_entries(void)
{
- acpi_cstate_t *c_state_map;
+ const acpi_cstate_t *c_state_map;
size_t entries;
c_state_map = soc_get_cstate_map(&entries);
diff --git a/src/soc/intel/common/block/include/intelblocks/acpi.h b/src/soc/intel/common/block/include/intelblocks/acpi.h
index 5497275d23..02a9da58cf 100644
--- a/src/soc/intel/common/block/include/intelblocks/acpi.h
+++ b/src/soc/intel/common/block/include/intelblocks/acpi.h
@@ -38,7 +38,7 @@ void soc_write_sci_irq_select(uint32_t scis);
* get_cstate_map returns a table of processor specific acpi_cstate_t entries
* and number of entries in the table
*/
-acpi_cstate_t *soc_get_cstate_map(size_t *num_entries);
+const acpi_cstate_t *soc_get_cstate_map(size_t *num_entries);
/*
* get_tstate_map returns a table of processor specific acpi_tstate_t entries