On Thu, 23 Jul 2015 12:42:15 +0200
Peter Zijlstra <pet...@infradead.org> wrote:

> static __always_inline bool arch_static_branch_jump(struct static_key *key, 
> bool inv)
> {
>       if (!inv) {
>               asm_volatile_goto("1:"
>                       "jmp %l[l_yes]\n\t"

And what happens when this gets converted to a two byte jump?

-- Steve

>                       ".pushsection __jump_table,  \"aw\" \n\t"
>                       _ASM_ALIGN "\n\t"
>                       _ASM_PTR "1b, %l[l_yes], %c0 \n\t"
>                       ".popsection \n\t"
>                       : :  "i" (key) : : l_yes);
>       } else {
>               asm_volatile_goto("1:"
>                       "jmp %l[l_yes]\n\t"
>                       ".pushsection __jump_table_inv,  \"aw\" \n\t"
>                       _ASM_ALIGN "\n\t"
>                       _ASM_PTR "1b, %l[l_yes], %c0 \n\t"
>                       ".popsection \n\t"
>                       : :  "i" (key) : : l_yes);
>       }
>       return false;
> l_yes:
>       return true;
> }
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to