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]

 



On Thu, Dec 22, 2016 at 04:08:22PM +0200, Andy Shevchenko wrote:
> 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

Absolutely ! However this would be an evolution, and I would much
prefer to add this later as an atomic step later to enable other
users to also be using this shared macro. I did not have an immediate
need for a pop_section_tbl() macro as its not section specific.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux