From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
akpm@linuxfoundation.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] De-macro spin_trylock_irq, spin_trylock_irqsave, write_trylock_irqsave
Date: Sat, 16 Aug 2008 14:21:41 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0808161417400.3324@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20080816204855.GA5151@martell.zuzino.mipt.ru>
On Sun, 17 Aug 2008, Alexey Dobriyan wrote:
> On Sat, Aug 16, 2008 at 03:31:00PM +0200, Jiri Slaby wrote:
> >
> > Doesn't this break on sparc -- is it tested there?
>
> What's so special about sparc?
Sparc _used_ to save/restore the whole processor flags word with the irq
flags. That includes, iirc, things like the register window crap, so if
you did a save/restore flags in a function, it would get all that wrong
and things would blow up.
However, I don't think sparc has actually done that for a _loong_ time
now, due to it always being problematic.
> >> +static inline int spin_trylock_irqsave(spinlock_t *lock, unsigned long *flags)
However, I refuse to see this crap.
Like it or not, the 'flags' argument has always been pass-by-reference,
and not a pointer. It does that because it used to make a huge difference
for gcc code generation and for making it easy to do as a direct inline
asm. We're not going to change that.
Linus
next prev parent reply other threads:[~2008-08-16 21:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-16 9:59 Alexey Dobriyan
2008-08-16 13:31 ` Jiri Slaby
2008-08-16 20:48 ` Alexey Dobriyan
2008-08-16 21:21 ` Linus Torvalds [this message]
2008-08-17 7:52 ` David Miller
2008-08-16 13:46 ` Ingo Molnar
2008-08-16 21:04 ` Alexey Dobriyan
2008-08-16 21:18 ` Johannes Weiner
2008-08-17 9:31 ` Ingo Molnar
2008-08-17 12:30 ` Johannes Weiner
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=alpine.LFD.1.10.0808161417400.3324@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®