Re: [patch 062/104] ACPI: EC: count interrupts only if called frominterrupt handler.

From: Pavel Machek
Date: Fri Dec 05 2008 - 08:07:13 EST


On Wed 2008-12-03 11:53:00, Greg KH wrote:
> 2.6.27-stable review patch. If anyone has any objections, please let us know.
>
> ------------------
> From: Alexey Starikovskiy <astarikovskiy@xxxxxxx>
>
> commit 7b4d469228a92a00e412675817cedd60133de38a upstream.
>
> fix 2.6.28 EC interrupt storm regression
>

That changelog is pretty useless :-(.

> @@ -219,7 +219,8 @@ static void gpe_transaction(struct acpi_
> goto unlock;
> err:
> /* false interrupt, state didn't change */
> - ++ec->curr->irq_count;
> + if (in_interrupt())
> + ++ec->curr->irq_count;
> unlock:
> spin_unlock_irqrestore(&ec->curr_lock, flags);
> }

Is preempt_count() reliable with !config_preempt, too?

Using in_interrupt here is quite ugly... definitely worth a comment
and perhaps gpe_transaction should get explicit 'am I in interrupt'
parameter.

At least RT kernels plan on moving interrupt handlers to threads...

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/