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

Pavel Machek
2008-12-05T13:07:12Z

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@suse.de>
>
> 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