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


Groups > linux.kernel > #1590248

Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data
Date 2017-03-01 12:10 +0100
Message-ID <tgaiR-2ds-1@gated-at.bofh.it> (permalink)
References <tbOqC-3eL-5@gated-at.bofh.it> <tg9d8-1fv-15@gated-at.bofh.it> <tg9mN-1zt-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Thomas Gleixner <tglx@linutronix.de> wrote:

> On Wed, 1 Mar 2017, Ingo Molnar wrote:
> > 
> > * Jiri Slaby <jslaby@suse.cz> wrote:
> > 
> > > This is a start of series to unify use of ENTRY, ENDPROC, GLOBAL, END,
> > > and other macros across x86. When we have all this sorted out, this will
> > > help to inject DWARF unwinding info by objtool later.
> > > 
> > > So, let us use the macros this way:
> > > * ENTRY -- start of a global function
> > > * ENDPROC -- end of a local/global function
> > > * GLOBAL -- start of a globally visible data symbol
> > > * END -- end of local/global data symbol
> > 
> > So how about using macro names that actually show the purpose, instead of 
> > importing all the crappy, historic, essentially randomly chosen debug symbol macro 
> > names from the binutils and older kernels?
> > 
> > Something sane, like:
> > 
> > 	SYM__FUNCTION_START
> 
> Sane would be:
> 
>      	SYM_FUNCTION_START
> 
> The double underscore is just not giving any value.

So the double underscore (at least in my view) has two advantages:

1) it helps separate the prefix from the postfix.

I.e. it's a 'symbols' namespace, and a 'function start', not the 'start' of a 
'symbol function'.

2) It also helps easy greppability.

Try this in latest -tip:

  git grep e820__

To see all the E820 API calls - with no false positives!

'git grep e820_' on the other hand is a lot less reliable...

But no strong feelings either way, I just try to sneak in these small namespace 
structure tricks when nobody's looking! ;-)

Thanks,

	Ingo

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


Thread

[PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Jiri Slaby <jslaby@suse.cz> - 2017-02-17 12:00 +0100
  [RFC 09/10] x86: boot, extract efi_pe_entry from startup_64 Jiri Slaby <jslaby@suse.cz> - 2017-02-17 12:00 +0100
  [PATCH 03/10] x86: boot, annotate functions properly Jiri Slaby <jslaby@suse.cz> - 2017-02-17 12:00 +0100
  Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Juergen Gross <jgross@suse.com> - 2017-02-17 12:20 +0100
  Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Jiri Slaby <jslaby@suse.cz> - 2017-03-01 11:00 +0100
  Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Thomas Gleixner <tglx@linutronix.de> - 2017-03-01 11:10 +0100
    Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Ingo Molnar <mingo@kernel.org> - 2017-03-01 12:10 +0100
      Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Jiri Slaby <jslaby@suse.cz> - 2017-03-03 15:20 +0100
      Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data hpa@zytor.com - 2017-03-03 19:30 +0100
        Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Jiri Slaby <jslaby@suse.cz> - 2017-03-06 15:20 +0100
        Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Ingo Molnar <mingo@kernel.org> - 2017-03-07 09:10 +0100
      Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data hpa@zytor.com - 2017-03-03 20:50 +0100
        Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Ingo Molnar <mingo@kernel.org> - 2017-03-07 09:40 +0100
          [RFC] linkage: new macros for functions and data Jiri Slaby <jslaby@suse.cz> - 2017-03-07 18:50 +0100
  Re: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Ingo Molnar <mingo@kernel.org> - 2017-03-02 00:00 +0100

csiph-web