Re: [PATCH v2] nvme-apple: Use acquire/release for queue enabled state

Keith Busch <[email protected]> Mon, 6 Jul 2026 12:54:03 -0600
Newsgroups dev.linux.lists.asahi,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-nvme,org.kernel.vger.linux-kernel
Message-ID <akv5y0wqV76xKZmj@kbusch-mbp>
On Thu, Jun 18, 2026 at 10:15:43AM +0800, Gui-Dong Han wrote:
> apple_nvme_init_queue() initializes queue state and then marks the queue
> enabled. The interrupt and request paths check enabled before using that
> queue state.
> 
> The old wmb() after WRITE_ONCE(enabled, true) does not publish the
> earlier initialization before enabled becomes visible. Use a release store
> when enabling the queue and acquire loads when testing it.
> 
> Although the shutdown-side enabled accesses are not used for publishing
> queue initialization, use helpers for them as well for consistency.

Thanks, applied to nvme-7.3.