Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338465

Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl()

From "Luis R. Rodriguez" <mcgrof@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl()
Date 2016-02-19 22:10 +0100
Message-ID <r40tj-2SE-5@gated-at.bofh.it> (permalink)
References <r3TBv-5OY-1@gated-at.bofh.it> <r3TBw-5OY-25@gated-at.bofh.it> <r400i-2qQ-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 19, 2016 at 12:26:51PM -0800, H. Peter Anvin wrote:
> On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote:
> > With a generic linker tables solution in place we
> > need a general asm solution for declaring entries
> > with asm. The first easy target is to cover the C
> > asm declarations, guard the header file for now
> > and define a first generic entry push_section_tbl()
> > to be used later for custom linker table annotations.
> > 
> > Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
> > ---
> >  include/asm-generic/sections.h | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
> > index af0254c09424..f5ea98bd85d2 100644
> > --- a/include/asm-generic/sections.h
> > +++ b/include/asm-generic/sections.h
> > @@ -3,8 +3,10 @@
> >  
> >  /* References to section boundaries */
> >  
> > +#ifndef __ASSEMBLY__
> >  #include <linux/compiler.h>
> >  #include <linux/types.h>
> > +#include <linux/sections.h>
> >  
> >  /*
> >   * Usage guidelines:
> > @@ -128,4 +130,12 @@ static inline bool init_section_intersects(void *virt, size_t size)
> >  	return memory_intersects(__init_begin, __init_end, virt, size);
> >  }
> >  
> > +/*
> > + * Some architectures do not like the "\t" at the end (s39), we should be
> > + * able to generalize this further, but so far this covers most architectures.
> > + */
> > +#define push_section_tbl(section, name, level, flags)			\
> > +	".pushsection " SECTION_TBL(section,name,level) ",  \"" #flags "\"\n\t"
> > +#endif
> > +
> 
> I think the \n\t is unnecessary.

Super! I wonder if we we can just use this on s390 as well without it pooping?
I ask as this would set a precedent.

  Luis

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC v2 0/7] linux: add linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 3/7] firmware: port built-in section to linker table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 6/7] dynamic_debug: port to use linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 5/7] jump_label: port __jump_table to linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
  [RFC v2 1/7] sections.h: add sections header to collect all section info "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
    Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info Greg KH <gregkh@linuxfoundation.org> - 2016-02-19 17:30 +0100
      Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-19 21:10 +0100
        Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info Greg KH <gregkh@linuxfoundation.org> - 2016-02-19 22:30 +0100
          Re: [RFC v2 1/7] sections.h: add sections header to collect all  section info "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 23:10 +0100
  [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
    Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:40 +0100
      Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 22:10 +0100
        Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl() "H. Peter Anvin" <hpa@zytor.com> - 2016-02-22 04:00 +0100
  [RFC v2 7/7] kprobes: port to linker table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 14:50 +0100
    Re: [RFC v2 7/7] kprobes: port to linker table Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-19 15:20 +0100
      Re: [RFC v2 7/7] kprobes: port to linker table "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-19 16:00 +0100
    RE: [RFC v2 7/7] kprobes: port to linker table 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2016-02-22 02:40 +0100
  Re: [RFC v2 0/7] linux: add linker tables "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:30 +0100
    Re: [RFC v2 0/7] linux: add linker tables "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 22:30 +0100
  Re: [RFC v2 2/7] tables.h: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:40 +0100
    Re: [RFC v2 2/7] tables.h: add linker table support "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 22:50 +0100
  Re: [RFC v2 2/7] tables.h: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-02-19 21:40 +0100
    Re: [RFC v2 2/7] tables.h: add linker table support "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-19 22:20 +0100

csiph-web