summaryrefslogtreecommitdiff
path: root/rust/kernel/debugfs/file_ops.rs
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2025-11-04 14:55:40 +0000
committerBorislav Petkov (AMD) <bp@alien8.de>2025-11-05 16:51:27 +0100
commit134b1eabe6d9df8873bd018c9465994db8bff945 (patch)
treece86e33a691ac0ea1de4d7d2490c8f8587c3d9d5 /rust/kernel/debugfs/file_ops.rs
parent7cb735d7c0cb4307b2072aae6268b5b2069a8658 (diff)
x86/mce/amd: Enable interrupt vectors once per-CPU on SMCA systems
Scalable MCA systems have a per-CPU register that gives the APIC LVT offset for the thresholding and deferred error interrupts. Currently, this register is read once to set up the deferred error interrupt and then read again for each thresholding block. Furthermore, the APIC LVT registers are configured each time, but they only need to be configured once per-CPU. Move the APIC LVT setup to the early part of CPU init, so that the registers are set up once. Also, this ensures that the kernel is ready to service the interrupts before the individual error sources (each MCA bank) are enabled. Apply this change only to SMCA systems to avoid breaking any legacy behavior. The deferred error interrupt is technically advertised by the SUCCOR feature. However, this was first made available on SMCA systems. Therefore, only set up the deferred error interrupt on SMCA systems and simplify the code. Guidance from hardware designers is that the LVT offsets provided from the platform should be used. The kernel should not try to enforce specific values. However, the kernel should check that an LVT offset is not reused for multiple sources. Therefore, remove the extra checking and value enforcement from the MCE code. The "reuse/conflict" case is already handled in setup_APIC_eilvt(). Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Tested-by: Tony Luck <tony.luck@intel.com> Link: https://lore.kernel.org/20251104-wip-mca-updates-v8-0-66c8eacf67b9@amd.com
Diffstat (limited to 'rust/kernel/debugfs/file_ops.rs')
0 files changed, 0 insertions, 0 deletions