From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org,
Andrew Morton <akpm@linux-foundation.org>,
Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] Add hard_irq_disable()
Date: Thu, 10 May 2007 13:24:48 +0530 [thread overview]
Message-ID: <a781481a0705100054r45c373a0lfd35b8b31b0e6032@mail.gmail.com> (raw)
In-Reply-To: <1178781677.14928.221.camel@localhost.localdomain>
On 5/10/07, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > So you're saying that this mechanism forces the arch (that really
> > wants hard_irq_disable) to _#define_ hard_irq_disable (as a macro),
> > and if it implements it as an inline function, for example, then we're
> > screwed?
>
> No. The idea is to do like we did for a few other things already
> (according to Linus request in fact), which is to write
>
> static inline void hard_irq_disable(void)
> {
> .../...
> }
> #define hard_irq_disable hard_irq_disable
>
> This is nicer than having an ARCH_HAS_xxx
Ok, that's reasonable, we don't want to end up with zillions of
ARCH_HAS_THIS and ARCH_HAS_THAT.
But then, what _is_ the problem with your approach above? An arch that
wants (and implements) hard_irq_disable will also #define that dummy
macro, so we just need to pull in the appropriate header (directly,
indirectly, anyhow -- we don't really care) into
include/linux/interrupt.h and then just do the exact same "#ifndef
hard_irq_disable" check that you're doing right now. I must be missing
something trivial (either that or I need to go and have a coffee :-)
because I don't see the possibility of hitting multiple _different_
definitions with the approach you mentioned just now.
next prev parent reply other threads:[~2007-05-10 7:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 5:25 [PATCH 2/3] Add hard_irq_disable() Benjamin Herrenschmidt
2007-05-10 5:41 ` Andrew Morton
2007-05-10 6:35 ` Benjamin Herrenschmidt
2007-05-10 7:35 ` Andrew Morton
2007-05-10 8:41 ` Benjamin Herrenschmidt
2007-05-10 8:49 ` David Miller
2007-05-10 8:50 ` Andrew Morton
2007-05-10 8:53 ` David Miller
2007-05-10 9:29 ` Benjamin Herrenschmidt
2007-05-10 11:01 ` Josh Boyer
2007-05-10 6:45 ` Satyam Sharma
2007-05-10 7:21 ` Benjamin Herrenschmidt
2007-05-10 7:54 ` Satyam Sharma [this message]
2007-05-10 8:46 ` Benjamin Herrenschmidt
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=a781481a0705100054r45c373a0lfd35b8b31b0e6032@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=rusty@rustcorp.com.au \
/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;
as well as URLs for NNTP newsgroup(s).