linux-yocto/drivers/platform/x86/amd
Corey Hickey bceec87a73 platform/x86/amd/pmc: Detect when STB is not available
Loading the amd_pmc module as:

    amd_pmc enable_stb=1

...can result in the following messages in the kernel ring buffer:

    amd_pmc AMDI0009:00: SMU cmd failed. err: 0xff
    ioremap on RAM at 0x0000000000000000 - 0x0000000000ffffff
    WARNING: CPU: 10 PID: 2151 at arch/x86/mm/ioremap.c:217 __ioremap_caller+0x2cd/0x340

Further debugging reveals that this occurs when the requests for
S2D_PHYS_ADDR_LOW and S2D_PHYS_ADDR_HIGH return a value of 0,
indicating that the STB is inaccessible. To prevent the ioremap
warning and provide clarity to the user, handle the invalid address
and display an error message.

Link: https://lore.kernel.org/platform-driver-x86/c588ff5d-3e04-4549-9a86-284b9b4419ba@amd.com
Fixes: 3d7d407dfb ("platform/x86: amd-pmc: Add support for AMD Spill to DRAM STB feature")
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20241028180241.1341624-1-bugfood-ml@fatooh.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-11-04 11:06:10 +01:00
..
pmc platform/x86/amd/pmc: Detect when STB is not available 2024-11-04 11:06:10 +01:00
pmf platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model 2024-11-04 10:55:22 +01:00
hsmp.c platform/x86/amd/hsmp: Check HSMP support on AMD family of processors 2024-06-03 11:57:28 +02:00
Kconfig platform/x86/amd/hsmp: Add support for ACPI based probing 2024-01-31 10:30:48 +02:00
Makefile platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature 2023-12-11 11:33:44 +01:00
wbrf.c platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature 2023-12-11 11:33:44 +01:00