mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] platform/x86/amd/hsmp: Harden ACPI probe, metric DRAM, and socket teardown
@ 2026-06-13 19:17 Muralidhara M K
  2026-06-13 19:17 ` [PATCH 1/3] platform/x86/amd/hsmp: Serialize ACPI HSMP is_probed with a probe mutex Muralidhara M K
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Muralidhara M K @ 2026-06-13 19:17 UTC (permalink / raw)
  To: ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel, Muralidhara M K

This series tightens concurrency and lifetime management in the ACPI-backed
AMD HSMP platform path so probe/remove races cannot corrupt global probe state,
leak metric-table DRAM mappings, or tear down shared resources while readers
might still be active.

Patch 1 introduces a dedicated probe mutex around ACPI probe, remove, and
init_acpi(), replacing ad-hoc synchronization on the global is_probed handshake.
lockdep_assert_held() documents the locking contract for init_acpi().

Patch 2 switches metric table DRAM from devm_ioremap() to ioremap() with
explicit init/teardown helpers, and embeds a per-socket mutex for metric reads.
The legacy platform driver wires the same helpers so non-ACPI builds stay
consistent.

Patch 3 replaces the global is_probed flag with miscdevice registration state,
refcounts ACPI socket platform devices with kref, and runs coordinated release
on the final put: misc deregistration when appropriate, metric unmap, and socket
array free. Socket storage uses kcalloc() with careful failure cleanup before
any kref is published.

Muralidhara M K (3):
  platform/x86/amd/hsmp: Serialize ACPI HSMP is_probed with a probe
    mutex
  platform/x86/amd/hsmp: Add explicit metric DRAM mapping and per-socket
    mutexes
  platform/x86/amd/hsmp: ACPI HSMP refcounted sockets and coordinated
    release

 drivers/platform/x86/amd/hsmp/acpi.c | 87 +++++++++++++++++++++++-----
 drivers/platform/x86/amd/hsmp/hsmp.c | 38 +++++++++++-
 drivers/platform/x86/amd/hsmp/hsmp.h |  9 ++-
 drivers/platform/x86/amd/hsmp/plat.c |  3 +
 4 files changed, 119 insertions(+), 18 deletions(-)

-- 
2.34.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-16 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-13 19:17 [PATCH 0/3] platform/x86/amd/hsmp: Harden ACPI probe, metric DRAM, and socket teardown Muralidhara M K
2026-06-13 19:17 ` [PATCH 1/3] platform/x86/amd/hsmp: Serialize ACPI HSMP is_probed with a probe mutex Muralidhara M K
2026-06-13 19:17 ` [PATCH 2/3] platform/x86/amd/hsmp: Add explicit metric DRAM mapping and per-socket mutexes Muralidhara M K
2026-06-13 19:17 ` [PATCH 3/3] platform/x86/amd/hsmp: ACPI HSMP refcounted sockets and coordinated release Muralidhara M K
2026-06-16  8:28 ` [PATCH 0/3] platform/x86/amd/hsmp: Harden ACPI probe, metric DRAM, and socket teardown M K, Muralidhara
2026-06-16 12:19   ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®