lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 07/10] x86/jump_label: Implement arch_static_assert()
On Tue, Jan 16, 2018 at 03:28:32PM +0100, Peter Zijlstra wrote:
> Implement the static (branch) assertion. It simply emits the address
> of the next instruction into a special section which objtool will read
> and validate against either __jump_table or .altinstructions.
>
> Use like:
>
> if (static_branch_likely(_key)) {
> arch_static_assert();
> /* do stuff */
> }
>
> Or
>
> if (static_cpu_has(_feat)) {
> arch_static_assert();

It looks to me like the asserts can be moved into the macros and the
assertion checking can happen by default ...?

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2018-01-18 14:33    [W:0.187 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site