public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Arjan van de Ven <arjanv@infradead.org>,
	Jes Sorensen <jes@trained-monkey.org>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	Oleg Nesterov <oleg@tv-sign.ru>,
	David Howells <dhowells@redhat.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Benjamin LaHaise <bcrl@kvack.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Christoph Hellwig <hch@infradead.org>, Andi Kleen <ak@suse.de>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Nicolas Pitre <nico@cam.org>
Subject: Re: [patch 3/8] mutex subsystem, add atomic_*_call_if_*() to i386
Date: Wed, 21 Dec 2005 15:32:43 -0500	[thread overview]
Message-ID: <20051221203243.GA19082@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0512211054450.4827@g5.osdl.org>

On Wed, Dec 21, 2005 at 10:57:40AM -0800, Linus Torvalds wrote:
> Actually (and re-reading the email I sent that wasn't obvious at all), my 
> _preferred_ fix is to literally force the use of the above kind of 
> function: not save/restore %eax at all, but just say that any function 
> that is called by the magic "atomic_*_call_if()" needs to always return 
> the argument it gets as its return value too.
> 
> That allows the caller to not even have to care. And the callee obviously 
> already _has_ that value, so it might as well return it (and in the best 
> case it's not going to add any cost at all, either to the caller or the 
> callee).
> 
> So you might opt to keep the asm the same, just change the calling 
> conventions.

This new macro is only going to be used in x86-specific files, right? 
There's no practical way to implement this on lots of other
architectures.

Embedding a call in asm("") can break other things too - for instance,
unwind tables could become inaccurate.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

  parent reply	other threads:[~2005-12-21 20:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-21 15:54 [patch 3/8] mutex subsystem, add atomic_*_call_if_*() to i386 Ingo Molnar
2005-12-21 18:54 ` Linus Torvalds
2005-12-21 18:57   ` Linus Torvalds
2005-12-21 20:01     ` Ingo Molnar
2005-12-21 20:32     ` Daniel Jacobowitz [this message]
2005-12-21 20:54       ` Nicolas Pitre
2005-12-22  9:18         ` Keith Owens
2005-12-21 19:47   ` Ingo Molnar
2005-12-21 22:40     ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2005-12-21 22:37 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=20051221203243.GA19082@nevyn.them.org \
    --to=dan@debian.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjanv@infradead.org \
    --cc=bcrl@kvack.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=jes@trained-monkey.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nico@cam.org \
    --cc=oleg@tv-sign.ru \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@osdl.org \
    --cc=zwane@arm.linux.org.uk \
    /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