* ACPI: EC: make kernel messages more useful when GPE storm is detected
@ 2008-11-01 11:05 Alan Jenkins
2008-11-01 12:32 ` Alexey Starikovskiy
0 siblings, 1 reply; 3+ messages in thread
From: Alan Jenkins @ 2008-11-01 11:05 UTC (permalink / raw)
To: linux acpi; +Cc: Alexey Starikovskiy
Make sure we can tell if the GPE storm workaround gets activated,
and avoid flooding the logs afterwards.
<http://bugzilla.kernel.org/show_bug.cgi?id=11841>
"plenty of line "ACPI: EC: non-query interrupt received,
switching to interrupt mode" in dmesg"
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index ef42316..139046c 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -286,7 +286,8 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
} else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
t->irq_count > ACPI_EC_STORM_THRESHOLD) {
- pr_debug(PREFIX "GPE storm detected\n");
+ pr_info(PREFIX "GPE storm detected, "
+ "transactions will use polling mode\n");
set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
}
return ret;
@@ -566,9 +567,15 @@ static u32 acpi_ec_gpe_handler(void *data)
if (!test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
!test_bit(EC_FLAGS_NO_GPE, &ec->flags)) {
/* this is non-query, must be confirmation */
- if (printk_ratelimit())
- pr_info(PREFIX "non-query interrupt received,"
+ if (!test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
+ if (printk_ratelimit())
+ pr_info(PREFIX "non-query interrupt received,"
+ " switching to interrupt mode\n");
+ } else {
+ /* hush, STORM switches the mode every transaction */
+ pr_debug(PREFIX "non-query interrupt received,"
" switching to interrupt mode\n");
+ }
set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
}
return ACPI_INTERRUPT_HANDLED;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: ACPI: EC: make kernel messages more useful when GPE storm is detected
2008-11-01 11:05 ACPI: EC: make kernel messages more useful when GPE storm is detected Alan Jenkins
@ 2008-11-01 12:32 ` Alexey Starikovskiy
2008-11-07 3:47 ` Len Brown
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Starikovskiy @ 2008-11-01 12:32 UTC (permalink / raw)
To: Alan Jenkins; +Cc: linux acpi
ACK
Thanks,
Alex.
Alan Jenkins wrote:
> Make sure we can tell if the GPE storm workaround gets activated,
> and avoid flooding the logs afterwards.
>
> <http://bugzilla.kernel.org/show_bug.cgi?id=11841>
> "plenty of line "ACPI: EC: non-query interrupt received,
> switching to interrupt mode" in dmesg"
>
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index ef42316..139046c 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -286,7 +286,8 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
> acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
> } else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
> t->irq_count > ACPI_EC_STORM_THRESHOLD) {
> - pr_debug(PREFIX "GPE storm detected\n");
> + pr_info(PREFIX "GPE storm detected, "
> + "transactions will use polling mode\n");
> set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
> }
> return ret;
> @@ -566,9 +567,15 @@ static u32 acpi_ec_gpe_handler(void *data)
> if (!test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
> !test_bit(EC_FLAGS_NO_GPE, &ec->flags)) {
> /* this is non-query, must be confirmation */
> - if (printk_ratelimit())
> - pr_info(PREFIX "non-query interrupt received,"
> + if (!test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
> + if (printk_ratelimit())
> + pr_info(PREFIX "non-query interrupt received,"
> + " switching to interrupt mode\n");
> + } else {
> + /* hush, STORM switches the mode every transaction */
> + pr_debug(PREFIX "non-query interrupt received,"
> " switching to interrupt mode\n");
> + }
> set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
> }
> return ACPI_INTERRUPT_HANDLED;
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ACPI: EC: make kernel messages more useful when GPE storm is detected
2008-11-01 12:32 ` Alexey Starikovskiy
@ 2008-11-07 3:47 ` Len Brown
0 siblings, 0 replies; 3+ messages in thread
From: Len Brown @ 2008-11-07 3:47 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: Alan Jenkins, linux acpi
applied.
thanks,
-len
On Sat, 1 Nov 2008, Alexey Starikovskiy wrote:
> ACK
> Thanks,
> Alex.
> Alan Jenkins wrote:
> > Make sure we can tell if the GPE storm workaround gets activated,
> > and avoid flooding the logs afterwards.
> >
> > <http://bugzilla.kernel.org/show_bug.cgi?id=11841>
> > "plenty of line "ACPI: EC: non-query interrupt received,
> > switching to interrupt mode" in dmesg"
> >
> > diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> > index ef42316..139046c 100644
> > --- a/drivers/acpi/ec.c
> > +++ b/drivers/acpi/ec.c
> > @@ -286,7 +286,8 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec
> > *ec,
> > acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
> > } else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
> > t->irq_count > ACPI_EC_STORM_THRESHOLD) {
> > - pr_debug(PREFIX "GPE storm detected\n");
> > + pr_info(PREFIX "GPE storm detected, "
> > + "transactions will use polling mode\n");
> > set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
> > }
> > return ret;
> > @@ -566,9 +567,15 @@ static u32 acpi_ec_gpe_handler(void *data)
> > if (!test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
> > !test_bit(EC_FLAGS_NO_GPE, &ec->flags)) {
> > /* this is non-query, must be confirmation */
> > - if (printk_ratelimit())
> > - pr_info(PREFIX "non-query interrupt received,"
> > + if (!test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
> > + if (printk_ratelimit())
> > + pr_info(PREFIX "non-query interrupt received,"
> > + " switching to interrupt mode\n");
> > + } else {
> > + /* hush, STORM switches the mode every transaction */
> > + pr_debug(PREFIX "non-query interrupt received,"
> > " switching to interrupt mode\n");
> > + }
> > set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
> > }
> > return ACPI_INTERRUPT_HANDLED;
> >
> >
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-07 3:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-01 11:05 ACPI: EC: make kernel messages more useful when GPE storm is detected Alan Jenkins
2008-11-01 12:32 ` Alexey Starikovskiy
2008-11-07 3:47 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox