ACPI: EC: make kernel messages more useful when GPE storm is detected
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"
drivers/acpi/ec.c +10 -3
@@ -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 ;
ACK
Thanks,
Alex.
Quoted 42 lines · Alan Jenkins
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"drivers/acpi/ec.c +10
-3@@ -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 ;
applied.
thanks,
-len
Quoted 53 lines · Alexey Starikovskiy
ACK
Thanks,
Alex.Quoted 33 lines · Alan Jenkins
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"drivers/acpi/ec.c +2
-1@@ -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); }drivers/acpi/ec.c +2
-2return 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 ())drivers/acpi/ec.c static u32 acpi_ec_gpe_handler(void *data) · line 581
Quoted 10 lines
drivers/acpi/ec.c +6
-0+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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html