From: Ingo Molnar <mingo@elte.hu>
To: Cyrill Gorcunov <gorcunov@openvz.org>
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 16:53:28 +0200 [thread overview]
Message-ID: <20090401145328.GB6196@elte.hu> (raw)
In-Reply-To: <20090329202208.155551990@openvz.org>
* Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> For this purpose init_ISA_irqs is called indirectly
> by x86_quirk_pre_intr_init.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
> arch/x86/kernel/irqinit_32.c | 4 +++-
> arch/x86/kernel/irqinit_64.c | 22 +++++++++++++++++++++-
> arch/x86/kernel/setup.c | 8 ++++++++
> 3 files changed, 32 insertions(+), 2 deletions(-)
>
> Index: linux-2.6.git/arch/x86/kernel/irqinit_32.c
> ===================================================================
> --- linux-2.6.git.orig/arch/x86/kernel/irqinit_32.c
> +++ linux-2.6.git/arch/x86/kernel/irqinit_32.c
> @@ -215,7 +215,7 @@ void __init native_init_IRQ(void)
> */
> for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
> int vector = FIRST_EXTERNAL_VECTOR + i;
> - /* SYSCALL_VECTOR was reserved in trap_init. */
> + /* X86-32: SYSCALL_VECTOR was reserved in trap_init. */
> if (!test_bit(vector, used_vectors))
> set_intr_gate(vector, interrupt[i]);
> }
> @@ -229,6 +229,7 @@ void __init native_init_IRQ(void)
> */
> x86_quirk_intr_init();
>
> +#ifdef CONFIG_X86_32
> /*
> * External FPU? Set up irq13 if so, for
> * original braindamaged IBM FERR coupling.
> @@ -237,4 +238,5 @@ void __init native_init_IRQ(void)
> setup_irq(FPU_IRQ, &fpu_irq);
>
> irq_ctx_init(smp_processor_id());
> +#endif
> }
> Index: linux-2.6.git/arch/x86/kernel/irqinit_64.c
> ===================================================================
> --- linux-2.6.git.orig/arch/x86/kernel/irqinit_64.c
> +++ linux-2.6.git/arch/x86/kernel/irqinit_64.c
> @@ -21,6 +21,7 @@
> #include <asm/pgtable.h>
> #include <asm/desc.h>
> #include <asm/apic.h>
> +#include <asm/setup.h>
> #include <asm/i8259.h>
>
> /*
> @@ -174,7 +175,8 @@ void __init native_init_IRQ(void)
> {
> int i;
>
> - init_ISA_irqs();
> + /* Execute any quirks before the call gates are initialised: */
> + x86_quirk_pre_intr_init();
>
> apic_intr_init();
>
> @@ -185,10 +187,28 @@ void __init native_init_IRQ(void)
> */
> for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
> int vector = FIRST_EXTERNAL_VECTOR + i;
> + /* X86-32: SYSCALL_VECTOR was reserved in trap_init. */
> if (!test_bit(vector, used_vectors))
> set_intr_gate(vector, interrupt[i]);
> }
>
> if (!acpi_ioapic)
> setup_irq(2, &irq2);
> +
> + /*
> + * Call quirks after call gates are initialised (usually add in
> + * the architecture specific gates):
> + */
> + x86_quirk_intr_init();
> +
> +#ifdef CONFIG_X86_32
> + /*
> + * External FPU? Set up irq13 if so, for
> + * original braindamaged IBM FERR coupling.
> + */
> + if (boot_cpu_data.hard_math && !cpu_has_fpu)
> + setup_irq(FPU_IRQ, &fpu_irq);
> +
> + irq_ctx_init(smp_processor_id());
> +#endif
> }
> Index: linux-2.6.git/arch/x86/kernel/setup.c
> ===================================================================
> --- linux-2.6.git.orig/arch/x86/kernel/setup.c
> +++ linux-2.6.git/arch/x86/kernel/setup.c
> @@ -1087,3 +1087,11 @@ void __init x86_quirk_time_init(void)
> setup_irq(0, &irq0);
> }
> #endif /* CONFIG_X86_32 */
> +
> +#ifdef CONFIG_X86_64
> +void x86_quirk_pre_intr_init(void)
> +{
> + init_ISA_irqs();
> +}
> +void x86_quirk_intr_init(void) { }
> +#endif
Hm, wouldnt it be cleaner to add it as a new quirk function vector
in struct x86_quirks? See arch/x86/include/asm/setup.h.
Ingo
next prev parent reply other threads:[~2009-04-01 14:53 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 [this message]
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
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=20090401145328.GB6196@elte.hu \
--to=mingo@elte.hu \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®