From: Karsten Wiese <annabellesgarden@yahoo.de>
To: Ingo Oeser <ioe-lkml@rameria.de>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARCH_HAS_IRQ_PER_CPU avoids dead code in __do_IRQ()
Date: Sun, 7 Aug 2005 12:25:21 +0200 [thread overview]
Message-ID: <200508071225.21825.annabellesgarden@yahoo.de> (raw)
In-Reply-To: <200508062329.05081.ioe-lkml@rameria.de>
Am Samstag, 6. August 2005 23:28 schrieb Ingo Oeser:
> Hi Karsten,
>
> On Saturday 06 August 2005 18:14, Karsten Wiese wrote:
> > From: Karsten Wiese <annabellesgarden@yahoo.de>
> >
> > IRQ_PER_CPU is not used by all architectures.
> > To avoid dead code generation in __do_IRQ()
> > this patch introduces the macro ARCH_HAS_IRQ_PER_CPU.
> >
> > ARCH_HAS_IRQ_PER_CPU is defined by architectures using
> > IRQ_PER_CPU in their
> > include/asm_ARCH/irq.h
> > file.
>
> Why not the other way around?
>
> Just define IRQ_PER_CPU to 0 on architectures not needing it and
> add a FAT comment there, that this disables it. Or make it a config option.
>
> Then just leave the code as is and let GCC optimize the dead code
> away without any changes in the C file. It works, I just checked it ;-)
>
With my proposal the
#if defined(ARCH_HAS_IRQ_PER_CPU)
....
#endif
lets readers of __do_IRQ() immediately grasp:
"this block might not be compiled / depends an ARCH"
And you'll get compile error's using IRQ_PER_CPU on ie i386,
letting you immediately know,
that you've got to change something to be able to use IRQ_PER_CPU.
That are advantages I think.
Otherwise your proposal is ok for me too.
Regards,
Karsten
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
next prev parent reply other threads:[~2005-08-07 10:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-06 16:14 Karsten Wiese
2005-08-06 21:28 ` Ingo Oeser
2005-08-07 10:25 ` Karsten Wiese [this message]
2005-08-07 11:07 ` Ingo Oeser
2005-08-07 11:56 ` Karsten Wiese
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=200508071225.21825.annabellesgarden@yahoo.de \
--to=annabellesgarden@yahoo.de \
--cc=ioe-lkml@rameria.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®