summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>2026-07-23 16:45:28 +0530
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-07-27 21:43:48 +0300
commite860e561926bf75e323d43fe59a9bf25d2ef33a3 (patch)
tree91eb16bb24deb83034593daac6250076e7a7614d /tools/perf/scripts/python/stackcollapse.py
parent946000e1d594a9005e178f4166a09941ad5d454a (diff)
platform/x86/amd/pmf: Use per-SoC smu_regs struct for SMU mailbox registers
Different AMD platforms use varying SMU register layouts for PMF-SMU mailbox communication. The register offsets are currently hardcoded as AMD_PMF_REGISTER_MESSAGE, AMD_PMF_REGISTER_RESPONSE and AMD_PMF_REGISTER_ARGUMENT directly in amd_pmf_send_cmd() and amd_pmf_dump_registers(), making it difficult to support platforms that use a different mailbox register layout without scattering per-platform conditionals across the send path. Introduce struct amd_pmf_smu_regs to capture the SoC-specific SMU mailbox register offsets (msg_reg, resp_reg, arg_reg) and add a pointer to it in struct amd_pmf_dev. RMB, PS, 1AH_M20H and 1AH_M60H all share the same legacy register layout and point to a single shared amd_pmf_smu_regs_v1 instance, avoiding redundant struct definitions. Convert the pmf_pci_ids[] table from PCI_DEVICE() to PCI_DEVICE_DATA(), embedding the smu_regs pointer directly as driver_data. Introduce amd_pmf_get_smu_mb_offset() which resolves the matching PCI entry via pci_match_id() at probe time and assigns driver_data to dev->smu_regs. Update all SMU register accesses in amd_pmf_send_cmd() and amd_pmf_dump_registers() to go through dev->smu_regs. Remove the hardcoded register offset references from the send path. New platform support requires only a new smu_regs instance and a corresponding PCI_DEVICE_DATA() entry. No functional changes for existing platforms. Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260723111534.1940925-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions