Re: [PATCH v6 5/5] rust: add arch_static_branch

2024-08-10 Thread Peter Zijlstra
On Sat, Aug 10, 2024 at 11:44:13PM +0200, Alice Ryhl wrote: > On Sat, Aug 10, 2024 at 11:04 PM Peter Zijlstra wrote: > > > > On Thu, Aug 08, 2024 at 05:23:41PM +, Alice Ryhl wrote: > > > > > +/// Wrapper around `asm!` that uses at&t syntax on x86. > > > +// Uses a semicolon to avoid parsing am

Re: [PATCH v6 5/5] rust: add arch_static_branch

2024-08-10 Thread Alice Ryhl
On Sat, Aug 10, 2024 at 11:04 PM Peter Zijlstra wrote: > > On Thu, Aug 08, 2024 at 05:23:41PM +, Alice Ryhl wrote: > > > +/// Wrapper around `asm!` that uses at&t syntax on x86. > > +// Uses a semicolon to avoid parsing ambiguities, even though this does > > not match native `asm!` > > +// sy

Re: [PATCH v6 5/5] rust: add arch_static_branch

2024-08-10 Thread Peter Zijlstra
On Thu, Aug 08, 2024 at 05:23:41PM +, Alice Ryhl wrote: > +/// Wrapper around `asm!` that uses at&t syntax on x86. > +// Uses a semicolon to avoid parsing ambiguities, even though this does not > match native `asm!` > +// syntax. > +#[cfg(target_arch = "x86_64")] > +#[macro_export] > +macro_r

[PATCH v6 5/5] rust: add arch_static_branch

2024-08-08 Thread Alice Ryhl
To allow the Rust implementation of static_key_false to use runtime code patching instead of the generic implementation, pull in the relevant inline assembly from the jump_label.h header by running the C preprocessor on a .rs.S file. Build rules are added for .rs.S files. Since the relevant inline