[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070223180655.B2120@unix-os.sc.intel.com>
Date: Fri, 23 Feb 2007 18:06:55 -0800
From: "Siddha, Suresh B" <suresh.b.siddha@...el.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>,
akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
Zwane Mwaikambo <zwane@...radead.org>,
Ashok Raj <ashok.raj@...el.com>, Ingo Molnar <mingo@...e.hu>,
"Lu, Yinghai" <yinghai.lu@....com>,
Natalie Protasevich <protasnb@...il.com>,
Andi Kleen <ak@...e.de>,
"Siddha, Suresh B" <suresh.b.siddha@...el.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 14/14] genirq: Mask irqs when migrating them.
Andrew, This is a bug fix and must go in before 2.6.21.
Acked-by: Suresh Siddha <suresh.b.siddha@...el.com>
On Fri, Feb 23, 2007 at 04:46:20AM -0700, Eric W. Biederman wrote:
>
> move_native_irqs tries to do the right thing when migrating irqs
> by disabling them. However disabling them is a software logical
> thing, not a hardware thing. This has always been a little flaky
> and after Ingo's latest round of changes it is guaranteed to not
> mask the apic.
>
> So this patch fixes move_native_irq to directly call the mask and
> unmask chip methods to guarantee that we mask the irq when we
> are migrating it. We must do this as it is required by
> all code that call into the path.
>
> Since we don't know the masked status when IRQ_DISABLED is
> set so we will not be able to restore it. The patch makes the code
> just give up and trying again the next time this routing is called.
>
> Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
> ---
> kernel/irq/migration.c | 9 ++++-----
> 1 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
> index 4baa3bb..77b7acc 100644
> --- a/kernel/irq/migration.c
> +++ b/kernel/irq/migration.c
> @@ -65,12 +65,11 @@ void move_native_irq(int irq)
> if (likely(!(desc->status & IRQ_MOVE_PENDING)))
> return;
>
> - if (likely(!(desc->status & IRQ_DISABLED)))
> - desc->chip->disable(irq);
> + if (unlikely(desc->status & IRQ_DISABLED))
> + return;
>
> + desc->chip->mask(irq);
> move_masked_irq(irq);
> -
> - if (likely(!(desc->status & IRQ_DISABLED)))
> - desc->chip->enable(irq);
> + desc->chip->unmask(irq);
> }
>
> --
> 1.5.0.g53756
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists