On Fri, Aug 02, 2024 at 09:31:27AM +0000, Alice Ryhl wrote:
Add just enough support for static key so that we can use it from
tracepoints. Tracepoints rely on `static_key_false` even though it is
deprecated, so we add the same functionality to Rust.
It is not possible to use the existing C implementation of
arch_static_branch because it passes the argument `key` to inline
assembly as an 'i' parameter, so any attempt to add a C helper for this
function will fail to compile because the value of `key` must be known
at compile-time.
One disadvantage of this patch is that it introduces a fair amount of
duplicated inline assembly. However, this is a limited and temporary
situation:
1. Most inline assembly has no reason to be duplicated like this. It is
only needed here due to the use of 'i' parameters.
2. Alice will submit a patch along the lines of [1] that removes the
duplication. This will happen as a follow-up to this patch series.
You're talking about yourself in the 3rd person?
What's the rush, why not do it right first?