Re: [PATCH v5 09/14] jump_label: port __jump_table to linker tables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, hpa@xxxxxxxxx, acme@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, jpoimboe@xxxxxxxxxx, bp@xxxxxxxxx, npiggin@xxxxxxxxx, mhiramat@xxxxxxxxxx, masami.hiramatsu.pt@xxxxxxxxxxx, jbaron@xxxxxxxxxx, heiko.carstens@xxxxxxxxxx, ananth@xxxxxxxxxxxxxxxxxx, anil.s.keshavamurthy@xxxxxxxxx, davem@xxxxxxxxxxxxx, realmz6@xxxxxxxxx, dalias@xxxxxxxx, linux@xxxxxxxxxxxxxxxx
- Subject: Re: [PATCH v5 09/14] jump_label: port __jump_table to linker tables
- From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
- Date: Thu, 22 Dec 2016 16:08:22 +0200
- Cc: x86@xxxxxxxxxx, luto@xxxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, linux@xxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, gnomes@xxxxxxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, arnd@xxxxxxxx, ming.lei@xxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, pebolle@xxxxxxxxxx, fontana@xxxxxxxxxxxxxxx, david.vrabel@xxxxxxxxxx, konrad.wilk@xxxxxxxxxx, mcb30@xxxxxxxx, jgross@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, dvhart@xxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, mmarek@xxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, jkosina@xxxxxxx, korea.drzix@xxxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, tony.luck@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will.deacon@xxxxxxx, rostedt@xxxxxxxxxxx, jani.nikula@xxxxxxxxx, mchehab@xxxxxxxxxxxxxxx, markus.heiser@xxxxxxxxxxx, jolsa@xxxxxxxxxx, msalter@xxxxxxxxxx, chris@xxxxxxxxxx, jcmvbkbc@xxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, adrian.hunter@xxxxxxxxx, dsahern@xxxxxxxxx, namhyung@xxxxxxxxxx, wangnan0@xxxxxxxxxx, dmitry.torokhov@xxxxxxxxx, joro@xxxxxxxxxx, paulus@xxxxxxxxx, mpe@xxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <20161222023811.21246-10-mcgrof@kernel.org>
- Organization: Intel Finland Oy
- References: <1471642454-5679-1-git-send-email-mcgrof@kernel.org> <20161222023811.21246-1-mcgrof@kernel.org> <20161222023811.21246-10-mcgrof@kernel.org>
On Wed, 2016-12-21 at 18:38 -0800, Luis R. Rodriguez wrote:
> Move the __jump_table from the a custom section solution
> to a generic solution, this avoiding extra vmlinux.lds.h
> customizations.
>
> This also demos the use of the .data linker table and of
> the shared asm call push_section_tbl().
>
> {
> asm_volatile_goto("1:\n\t"
> WASM(nop) "\n\t"
> - ".pushsection __jump_table, \"aw\"\n\t"
> + push_section_tbl_any(.data, __jump_table, aw)
> ".word 1b, %l[l_yes], %c0\n\t"
> ".popsection\n\t"
> : : "i" (&((char *)key)[branch]) : : l_yes);
> @@ -26,7 +28,7 @@ static __always_inline bool
> arch_static_branch_jump(struct static_key *key, bool
> {
> asm_volatile_goto("1:\n\t"
> WASM(b) " %l[l_yes]\n\t"
> - ".pushsection __jump_table, \"aw\"\n\t"
> + push_section_tbl_any(.data, __jump_table, aw)
> ".word 1b, %l[l_yes], %c0\n\t"
> ".popsection\n\t"
Does it make sense to introduce something like
#define pop_section_tbl ".popsection\n\t"
#define pop_section_tbl_any pop_section_tbl
?
--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]