Re: [PATCH 1/2] x86/amd_node: Remove smn_exclusive
Jason Andryuk <[email protected]>
| Newsgroups | org.kernel.vger.stable,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 2026-08-12 15:28, Borislav Petkov wrote:
> On Mon, Aug 10, 2026 at 10:07:47AM -0400, Yazen Ghannam wrote:
>> 'smn_exclusive' wasn't originally intended to be used for bounds
>> checking the array. But the original use is no longer needed, so it can
>> be removed.
>
> Why is it no longer needed? Apparently I didn't get that memo yet...
>
> 83518453074d ("x86/amd_node: Add SMN offsets to exclusive region access") is
> talking about the potential concurrent access. Why is that ok now all of
> a sudden?
83518453074d set smn_exclusive after successfully calling
pci_request_config_region_exclusive(). smn_exclusive gated access in
__amd_smn_rw().
Things moved around, and now pci_request_config_region_exclusive() is
called earlier. At the end of amd_smn_init(), either amd_roots == NULL
and smn_exclusive == false or amd_roots != NULL and smn_exclusive ==
true. smn_exclusive is redundant, and amd_roots can just be used directly.
Regards,
Jason