From: Len Brown <len.brown@intel.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Natalie Protasevich <Natalie.Protasevich@UNISYS.com>,
Bjorn Helgaas <bjorn.helgaas@hp.com>
Subject: Re: [PATCH] fix platform_rename_gsi related ia32 build breakage
Date: 11 Nov 2004 18:25:38 -0500 [thread overview]
Message-ID: <1100215538.5876.779.camel@d845pe> (raw)
In-Reply-To: <Pine.LNX.4.58.0411111427050.2301@ppc970.osdl.org>
On Thu, 2004-11-11 at 17:30, Linus Torvalds wrote:
>
> On Thu, 11 Nov 2004, Len Brown wrote:
> >
> > I used a function pointer here because the same kernel binary must
> be
> > able to run on an ES7000 or a non-ES7000, so the compile-time inline
> > idiom doesn't work.
>
> Sure it does. Do something like this in a header file
>
> static inline int translate_irq_number(...)
> {
> #ifdef CONFIG_ACPI_BOOT
> return fn_ptr_xxx();
> #else
> return irq;
> #endif
> }
sure, we could add a wrapper for the wrapper,
but the ifdefs are already gone without doing this --
platform_rename_gsi is present with or without ACPI.
I suppose I could shrink the kernel by 4-bytes by compiling out the
function pointer when IO_APIC is not defined. I'll be happy to optimize
for that case if you think it justifies the code; though if I were
optimizing for that case, this probably isn't where I'd start.
> which means that yes, it uses the function pointer when it is
> meaningful, but if there is no point, the code just goes away.
>
> > If you read this far and have suggestions for a more descriptive
> name than platform_rename_gsi(), just let me know.
>
> At _least_ write out what the hell "gsi" is.
>
> TLA's are bad. "gsi" apparently isn't the Geological Survey of
> Ireland, but that's all I can tell from google.
The _gsi in platform_rename_gsi was consistent with the surrounding use
in the ACPI case. I decided to re-use the same funtion for the MPS case
for simplicity, even though io_apic.c uses _irq. If you like, I can add
a synonym using an inline for _irq, but I thought we were moving away
from using _irq, not towards it.
GSI = Global System Interrupt
IRQ = overused so much it means nothing at all
While this fact may not win you over as a fan, GSI is actually
consistent with the language in the ACPI spec. I don't know if that is
where Bjorn came up with the name, but I do think it was a positive
change. The reason is that "global" actually means something -- and it
still has the same semantics no matter if your machine passes around cpu
interrupt vectors or if it passes around pin numbers.
cheers,
-Len
next prev parent reply other threads:[~2004-11-11 23:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 23:50 [PATCH] fix platform_rename_gsi related ia32 build breakage Arnaldo Carvalho de Melo
2004-11-10 23:52 ` Arnaldo Carvalho de Melo
2004-11-11 0:10 ` Arnaldo Carvalho de Melo
2004-11-11 0:18 ` Arnaldo Carvalho de Melo
2004-11-11 0:24 ` Linus Torvalds
2004-11-11 0:29 ` Arnaldo Carvalho de Melo
2004-11-11 22:22 ` Len Brown
2004-11-11 22:30 ` Linus Torvalds
2004-11-11 23:25 ` Len Brown [this message]
2004-11-12 0:01 ` Linus Torvalds
2004-11-12 2:50 ` Len Brown
2004-11-12 3:08 ` Linus Torvalds
2004-11-11 0:20 ` Linus Torvalds
2004-11-11 0:23 ` Arnaldo Carvalho de Melo
2004-11-11 0:38 ` Andrew Morton
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=1100215538.5876.779.camel@d845pe \
--to=len.brown@intel.com \
--cc=Natalie.Protasevich@UNISYS.com \
--cc=acme@conectiva.com.br \
--cc=bjorn.helgaas@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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