From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org,
xemul@openvz.org, yhlu.kernel@gmail.com
Subject: Re: [patch 4/6] x86: irqinit - merge native_init_IRQ
Date: Wed, 1 Apr 2009 20:40:01 +0400 [thread overview]
Message-ID: <20090401164001.GE15781@localhost> (raw)
In-Reply-To: <20090401162250.GA22517@elte.hu>
[Ingo Molnar - Wed, Apr 01, 2009 at 06:22:50PM +0200]
...
| > I just remember -- I thought about that and since
| > x86_quirk_pre_intr_init described as external BUT implemented for
| > x86-32 only I needed to indroduce new x86-64 versions for this
| > (and since I know that there no need to do anything else except
| > calling init_ISA_irqs I desided to have separate wrapper for
| > that).
| >
| > And btw x86-32 already has init_ISA_irqs call and quirks are used
| > in x86-32 mode only so for 64bit it will be just a not needed
| > check. Which means - I could just use original
| > x86_quirk_pre_intr_init function which will call all I need.
| >
| > Or you meant something else?
|
| The typical solution there is to make the entry NULL in the 64-bit
| case. All the quirk handlers are conditional like this:
|
| arch/x86/kernel/mpparse.c: if (x86_quirks->mpc_apic_id)
| arch/x86/kernel/mpparse.c: apicid = x86_quirks->mpc_apic_id(m);
|
| or am i missing something?
|
| Ingo
|
The problem is that
x86_quirk_pre_intr_init
x86_quirk_intr_init
...
are guarded by CONFIG_X86_32. So I thought
to call x86_quirk_pre_intr_init which is implemented
as following
void __init x86_quirk_pre_intr_init(void)
{
if (x86_quirks->arch_pre_intr_init) {
if (x86_quirks->arch_pre_intr_init())
return;
}
init_ISA_irqs();
}
-- it will call init_ISA_irqs for us. But as I said
it's bound by CONFIG_X86_32. So we could remove this
limitation and use these function on x86-64 as well
and don't call for x86_quirks->arch_pre_intr_init.
The only reason I didn't do that -- we test
if x86_quirks->arch_pre_intr_init is defined for
nothing -- it's always NULL on x86-64.
Another reason for that -- irqinit_32.c calls for
x86_quirk_pre_intr_init and using the same name
for x86-64 will make code a bit cleaner I believe.
Maybe I better post a patch for review -- it'll
say more then me with my english :) ?
Cyrill
next prev parent reply other threads:[~2009-04-01 16:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 20:15 [patch 0/6] x86-tip: merge irqinit_32/64.c Cyrill Gorcunov
2009-03-29 20:15 ` [patch 1/6] x86: irqinit - order code snippets for easier merging Cyrill Gorcunov
2009-03-29 20:15 ` [patch 2/6] x86: irqinit - merge smp_intr_init Cyrill Gorcunov
2009-03-29 20:15 ` [patch 3/6] x86: irqinit - merge apic_intr_init Cyrill Gorcunov
2009-03-29 20:15 ` [patch 4/6] x86: irqinit - merge native_init_IRQ Cyrill Gorcunov
2009-04-01 14:53 ` Ingo Molnar
2009-04-01 15:01 ` Cyrill Gorcunov
2009-04-01 16:16 ` Cyrill Gorcunov
2009-04-01 16:22 ` Ingo Molnar
2009-04-01 16:40 ` Cyrill Gorcunov [this message]
2009-04-01 17:22 ` Cyrill Gorcunov
2009-04-01 18:56 ` Cyrill Gorcunov
2009-03-29 20:15 ` [patch 5/6] x86: irqinit - merge math_error_irq and headers Cyrill Gorcunov
2009-03-29 20:15 ` [patch 6/6] x86: irqinit - merge irqinit_32/64.c into irqinit.c Cyrill Gorcunov
2009-04-01 15:01 ` Ingo Molnar
2009-04-01 15:05 ` Cyrill Gorcunov
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=20090401164001.GE15781@localhost \
--to=gorcunov@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=xemul@openvz.org \
--cc=yhlu.kernel@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).