x86/amd_node: Use defines for SMN register offsets
authorYazen Ghannam <yazen.ghannam@amd.com>
Fri, 6 Dec 2024 16:12:06 +0000 (16:12 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 8 Jan 2025 10:02:28 +0000 (11:02 +0100)
commit79821b907f8d7fbc991554fc940075dc1b29a0f4
tree902a79f5043e9a43672894d94f1c0d14a5a12b6c
parent77466b798d59d6761501ff36094cf430d3876549
x86/amd_node: Use defines for SMN register offsets

There are more than one SMN index/data pair available for software use.
The register offsets are different, but the protocol is the same.

Use defines for the SMN offset values and allow the index/data offsets
to be passed to the read/write helper function.

This eases code reuse with other SMN users in the kernel.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20241206161210.163701-14-yazen.ghannam@amd.com
arch/x86/kernel/amd_node.c