public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alexander van Heukelum <heukelum@fastmail.fm>,
	Ingo Molnar <mingo@elte.hu>, Jan Beulich <jbeulich@novell.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC 0/6] x86 tip asm ENTRY,ENDPROC cleanup
Date: Sat, 14 Feb 2009 11:21:42 +0300	[thread overview]
Message-ID: <20090214082142.GA7648@localhost> (raw)
In-Reply-To: <49961178.6040101@zytor.com>

[H. Peter Anvin - Fri, Feb 13, 2009 at 04:34:00PM -0800]
> Alexander van Heukelum wrote:
>>
>> Hi Cyrill,
>>
>> I like this direction. If I understand correctly:
>>
>> ENTRY/END or GLOBAL/END for data.
>> ENTRY/ENDPROC or GLOBAL/ENDPROC for functions.
>>
>
> Fine for functions, but it's really not okay to use the same macros for  
> data.  Furthermore, we need to consider special entry points that don't  
> behave like normal functions -- like system call or interrupt entry.
>
> Why?  Because if we're compiling with frame pointers, we would like the  
> wrapper macros for functions to handle setting up and tearing down the  
> frame pointer, at least in the common case.
>
> 	-hpa
>

Peter, Alexander -- thanks for review!

>> ENTRY/END or GLOBAL/END for data.
>> ENTRY/ENDPROC or GLOBAL/ENDPROC for functions.

Well, there are nuances I believe. Plain .size without .cfi_...
for functions would not help in frame unwinding I think (in *.S
under debugger).

I wish we have strict rules for functions and data but it's not
that simple :)

For example, trampoline_64.S:
...
	.org 0x1000
trampoline_stack_end:
ENTRY(trampoline_level4_pgt)
...

we could use plain .globl (or new GLOBAL) here since we
have .org and ALIGN in ENTRY just not needed.

Same file:
...
ENTRY(trampoline_end)
...

I think we could have plain .globl here as well
(and we do that for 32bit version). Moreover TRAMPOLINE_SIZE
is page rounded anyway.

But in general I think you're right -- which means:
start with END for data and ENDPROC for functions and
then checkout the details as Peter mentioned. At least
I do ratiocinate like this. But I could be wrong :)

	- Cyrill -

  reply	other threads:[~2009-02-14  8:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13 21:50 [RFC 0/6] x86 tip asm ENTRY,ENDPROC cleanup Cyrill Gorcunov
2009-02-13 21:50 ` [RFC 1/6] x86: asm linkage - introduce GLOBAL macro Cyrill Gorcunov
2009-02-13 21:50 ` [RFC 2/6] x86: linkage - get rid of _X86 macros Cyrill Gorcunov
2009-02-13 21:50 ` [RFC 3/6] x86: copy.S - use GLOBAL,ENDPROC macros Cyrill Gorcunov
2009-02-13 21:50 ` [RFC 4/6] x86: pmjump " Cyrill Gorcunov
2009-02-13 21:50 ` [RFC 5/6] x86: compressed head_64 - use ENTRY,ENDPROC macros Cyrill Gorcunov
2009-02-13 21:50 ` [RFC 6/6] x86: compressed head_32 " Cyrill Gorcunov
2009-02-13 23:23 ` [RFC 0/6] x86 tip asm ENTRY,ENDPROC cleanup Alexander van Heukelum
2009-02-14  0:34   ` H. Peter Anvin
2009-02-14  8:21     ` Cyrill Gorcunov [this message]
2009-02-14 11:42     ` Alexander van Heukelum
2009-02-14 20:02       ` H. Peter Anvin
2009-02-19 16:13         ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090214082142.GA7648@localhost \
    --to=gorcunov@gmail.com \
    --cc=heukelum@fastmail.fm \
    --cc=hpa@zytor.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox