From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Satyam Sharma <satyam.sharma@gmail.com>
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 17:21:17 +1000 [thread overview]
Message-ID: <1178781677.14928.221.camel@localhost.localdomain> (raw)
In-Reply-To: <a781481a0705092345rf9fdc9cs8495516299a28fae@mail.gmail.com>
> 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
> 1. Introduce some CONFIG_WANTS_HARD_IRQ_DISABLE that is #defined (or
> left undefined) by the arch/.../defconfig (depending upon whether or
> not that arch implements a hard_irq_disable() for itself or not)
>
> 2. Then pull-in that code into include/linux/interrupt.h somehow
> (through some known / fixed header file, or through asm/system.h, or
> anyhow -- it doesn't really matter)
>
> 3. And:
>
> #ifndef CONFIG_WANTS_HARD_IRQ_DISABLE
> #define hard_irq_disable() do { } while(0)
> #endif
Well, last time I tried that, Linus NACKed it in favor of what I
described above.
> We don't need to standardize on some particular arch-specific header
> filename in this case.
True, that's my main problem here. Though really only the archs who
actually implement something special here need to be careful.
Ben.
next prev parent reply other threads:[~2007-05-10 7:21 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 [this message]
2007-05-10 7:54 ` Satyam Sharma
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=1178781677.14928.221.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=rusty@rustcorp.com.au \
--cc=satyam.sharma@gmail.com \
/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).