Re: [PATCH 01/25] xor: assert that xor_blocks is not called from interrupt context
Christoph Hellwig <[email protected]>
| Newsgroups | org.kernel.vger.sparclinux,dev.linux.lists.loongarch,org.infradead.lists.linux-riscv,org.infradead.lists.linux-um,org.kernel.vger.linux-alpha,org.kernel.vger.linux-arch,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel,org.kernel.vger.linux-raid,org.kernel.vger.linux-s390,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 03, 2026 at 11:55:17AM -0800, Eric Biggers wrote: > may_use_simd() is the "generic" way to check "can the FPU/vector/SIMD > registers be used". However, what it does varies by architecture, and > it's kind of a questionable abstraction in the first place. It's used > mostly by architecture-specific code. Yeah, I don't think that is quite right here. > How about "WARN_ON_ONCE(!preemptible())"? I think that covers the union > of the context restrictions correctly. (Compared to in_task(), it > handles the cases where hardirqs or softirqs are disabled.) Good enough I guess. Peter?