Re: [PATCH 32/33] remove >= nr_irqs checking with config_have_sparse_irq

From: Yinghai Lu
Date: Wed Aug 06 2008 - 06:30:17 EST


On Wed, Aug 6, 2008 at 1:43 AM, Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
> Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
> ---
> arch/x86/kernel/io_apic_64.c | 36 ++++++++++++++++++++++++------------
> arch/x86/kernel/irq_64.c | 2 +-
> drivers/char/random.c | 4 ++++
> fs/proc/proc_misc.c | 29 +++++++++++++++++------------
> kernel/irq/chip.c | 28 +++++++++++++++++++++++++++-
> kernel/irq/manage.c | 37 +++++++++++++++++++++++++++++++------
> 6 files changed, 104 insertions(+), 32 deletions(-)
>
> diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
> index 8bb6565..1416925 100644
> --- a/arch/x86/kernel/io_apic_64.c
> +++ b/arch/x86/kernel/io_apic_64.c

========================================================
> @@ -2475,16 +2486,17 @@ int create_irq(void)
> int irq;
> int new;
> unsigned long flags;
> - struct irq_cfg *cfg_new;
> + struct irq_cfg *cfg_new, *cfg;
>
> irq = -ENOSPC;
> spin_lock_irqsave(&vector_lock, flags);
> for (new = (nr_irqs - 1); new >= 0; new--) {
> if (platform_legacy_irq(new))
> continue;
> - cfg_new = get_irq_cfg(new);
> - if (cfg_new->vector != 0)
> + cfg = get_irq_cfg_without_new(new);
> + if (!cfg || cfg->vector != 0)
> continue;
> + cfg_new = get_irq_cfg(new);
> if (__assign_irq_vector(new, TARGET_CPUS) == 0)
> irq = new;
> break;
======================================
change to create_irq is not needed, it will disabled msi

YH
--
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/