diff options
author | Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | 2023-12-12 07:16:56 +0530 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-12-18 12:47:46 +0100 |
commit | 2b3a7f06caaf1aa7379cc0233462799852fcd8b4 (patch) | |
tree | f3d1ca4b60ed58018fdc1a1135b6b043fd297dba /drivers/platform/x86/p2sb.c | |
parent | ae82cef7d9c53cad0852d2d79d430b210432a025 (diff) |
platform/x86/amd/pmf: Change return type of amd_pmf_set_dram_addr()
In the current code, the metrics table information was required only
for auto-mode or CnQF at a given time. Hence keeping the return type
of amd_pmf_set_dram_addr() as static made sense.
But with the addition of Smart PC builder feature, the metrics table
information has to be shared by the Smart PC also and this feature
resides outside of core.c.
To make amd_pmf_set_dram_addr() visible outside of core.c make it
as a non-static function and move the allocation of memory for
metrics table from amd_pmf_init_metrics_table() to amd_pmf_set_dram_addr()
as amd_pmf_set_dram_addr() is the common function to set the DRAM
address.
Add a suspend handler that can free up the allocated memory for getting
the metrics table information.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20231212014705.2017474-4-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/p2sb.c')
0 files changed, 0 insertions, 0 deletions