From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Daniel Drake <dsd@gentoo.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
klausman@gentoo.org, rth@twiddle.net
Subject: Re: cant compile on alpha with gcc-4.3 and CONFIG_ALPHA_NAUTILUS
Date: Mon, 12 Jan 2009 00:05:32 +0300 [thread overview]
Message-ID: <20090111210532.GA1641@jurassic.park.msu.ru> (raw)
In-Reply-To: <49688C67.5050502@gentoo.org>
On Sat, Jan 10, 2009 at 11:54:15AM +0000, Daniel Drake wrote:
> To fix this, we could remove -Werror or we could restructure the irq_srm
> code so that it is only compiled on systems that use it. One small
> function (srm_device_interrupt) is used all over the place so would have
> to be separated. Patch attached, which has been compile-tested on nautilus.
> The disadvantage is that srm_device_interrupt() is now built on all alpha
> sys types, but it is so small that it doesn't seem worth creating its own
> file or creating ifdef spaghetti.
>
> Thoughts?
Your patch looks fine, but there is simpler fix which makes the compiler
to optimize problematic code away on systems with NR_IRQS <= 16.
Ivan.
diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c
index 3221201..a03fbca 100644
--- a/arch/alpha/kernel/irq_srm.c
+++ b/arch/alpha/kernel/irq_srm.c
@@ -63,6 +63,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
{
long i;
+ if (NR_IRQS <= 16)
+ return;
for (i = 16; i < max; ++i) {
if (i < 64 && ((ignore_mask >> i) & 1))
continue;
next prev parent reply other threads:[~2009-01-11 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-10 11:54 Daniel Drake
2009-01-11 21:05 ` Ivan Kokshaysky [this message]
2009-01-12 12:01 ` Daniel Drake
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=20090111210532.GA1641@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=dsd@gentoo.org \
--cc=klausman@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
/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®