Re: [PATCH] x86, UV: add uv_setup_irq() and uv_teardown_irq()functions
From: Ingo Molnar
Date: Thu Oct 02 2008 - 04:42:50 EST
* Dean Nelson <dcn@xxxxxxx> wrote:
> Provide a means for UV interrupt MMRs to be setup with the message to
> be sent when an MSI is raised.
>
> Signed-off-by: Dean Nelson <dcn@xxxxxxx>
>
> ---
>
> This functionality is needed by drivers/misc/sgi-xp. And a patch will be
> submitted shortly.
>
> arch/x86/kernel/Makefile | 2
> arch/x86/kernel/io_apic.c | 95 ++++++++++++++++++++++++++++++++++++++++
> arch/x86/kernel/uv_irq.c | 50 +++++++++++++++++++++
> include/asm-x86/uv/uv_irq.h | 34 ++++++++++++++
> kernel/irq/chip.c | 1
> 5 files changed, 181 insertions(+), 1 deletion(-)
>
> Index: linux/arch/x86/kernel/io_apic.c
> ===================================================================
> --- linux.orig/arch/x86/kernel/io_apic.c 2008-09-30 09:07:42.000000000 -0500
> +++ linux/arch/x86/kernel/io_apic.c 2008-09-30 12:54:12.000000000 -0500
> @@ -58,6 +58,8 @@
> #include <asm/setup.h>
> #include <asm/irq_remapping.h>
> #include <asm/hpet.h>
> +#include <asm/uv/uv_hub.h>
> +#include <asm/uv/uv_irq.h>
>
> #include <mach_ipi.h>
> #include <mach_apic.h>
> @@ -3694,6 +3696,99 @@ int arch_setup_ht_irq(unsigned int irq,
> }
> #endif /* CONFIG_HT_IRQ */
>
> +#ifdef CONFIG_X86_64
> +static void noop(unsigned int irq)
> +{
> +}
> +
> +static unsigned int noop_ret(unsigned int irq)
> +{
> + return 0;
> +}
> +
> +static void ack_apic(unsigned int irq)
> +{
> + ack_APIC_irq();
> +}
> +
> +static struct irq_chip uv_irq_chip = {
> + .name = "UV_MSI",
> + .startup = noop_ret,
> + .shutdown = noop,
> + .enable = noop,
> + .disable = noop,
> + .ack = noop,
> + .mask = noop,
> + .unmask = noop,
> + .eoi = ack_apic,
> + .end = noop,
> +};
hm, why isnt this in uv_irq.c?
> Index: linux/kernel/irq/chip.c
> ===================================================================
> --- linux.orig/kernel/irq/chip.c 2008-09-30 09:07:42.000000000 -0500
> +++ linux/kernel/irq/chip.c 2008-09-30 09:07:44.000000000 -0500
> @@ -79,6 +79,7 @@ void dynamic_irq_cleanup(unsigned int ir
> desc->chip_data = NULL;
> desc->handle_irq = handle_bad_irq;
> desc->chip = &no_irq_chip;
> + desc->name = "none";
> spin_unlock_irqrestore(&desc->lock, flags);
unrelated change that belongs into a separate patch.
patch looks quite clean otherwise.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/