mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Sitsofe Wheeler <sitsofe@yahoo.com>
Cc: linux-kernel@vger.kernel.org, lenb@kernel.org
Subject: Re: Reading EeePC900 battery info causes stalls
Date: Sat, 20 Sep 2008 17:07:08 +0400	[thread overview]
Message-ID: <48D4F57C.5010902@suse.de> (raw)
In-Reply-To: <48D4DD3C.3050308@yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Sitsofe Wheeler wrote:
> Alexey Starikovskiy wrote:
>> Could you cat /proc/interrupts ?
> 
>            CPU0
>   0:     106942   IO-APIC-edge      timer
>   1:        426   IO-APIC-edge      i8042
>   8:         41   IO-APIC-edge      rtc0
>   9:      27346   IO-APIC-fasteoi   acpi
>  12:       6840   IO-APIC-edge      i8042
>  14:          0   IO-APIC-edge      ata_piix
>  15:        203   IO-APIC-edge      ata_piix
>  16:      92357   IO-APIC-fasteoi   uhci_hcd:usb5, HDA Intel, 
> i915@pci:0000:00:02.0
>  18:      38195   IO-APIC-fasteoi   ath, uhci_hcd:usb4
>  19:          0   IO-APIC-fasteoi   uhci_hcd:usb3
>  23:      25150   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb2
> NMI:          0   Non-maskable interrupts
> LOC:     142112   Local timer interrupts
> TRM:          0   Thermal event interrupts
> SPU:          0   Spurious interrupts
> ERR:          0
> MIS:          0
Could you please try following patch on top?

[-- Attachment #2: more_storm.patch --]
[-- Type: text/x-diff, Size: 1582 bytes --]

ACPI: EC: disable GPE during QUERY handling too.

From: Alexey Starikovskiy <astarikovskiy@suse.de>


---

 drivers/acpi/ec.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)


diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 8d6b7e9..e027077 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -226,9 +226,16 @@ static void acpi_ec_gpe_query(void *ec_cxt);
 static int ec_check_sci(struct acpi_ec *ec, u8 state)
 {
 	if (state & ACPI_EC_FLAG_SCI) {
-		if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
+		if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) {
+			/* disable GPE until next transaction */
+			if (in_interrupt() &&
+			    test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
+				clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+				acpi_disable_gpe(NULL, ec->gpe, ACPI_ISR);
+			}
 			return acpi_os_execute(OSL_EC_BURST_HANDLER,
 				acpi_ec_gpe_query, ec);
+		}
 	}
 	return 0;
 }
@@ -281,8 +288,9 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
 	if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
 		/* check if we received SCI during transaction */
 		ec_check_sci(ec, acpi_ec_read_status(ec));
-		/* it is safe to enable GPE outside of transaction */
-		acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+		/* we expect query, enable GPE back */
+		if (!test_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
+			acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
 	} else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
 		   ec->irq_count > ACPI_EC_STORM_THRESHOLD) {
 		pr_debug(PREFIX "GPE storm detected\n");

  parent reply	other threads:[~2008-09-20 13:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.aea4e10hJLpVS/qr4bumSa5e9C0@ifi.uio.no>
     [not found] ` <fa.uDmoMIWw4thxpZxpYeSIpVJhAOo@ifi.uio.no>
     [not found]   ` <fa.RIMmQqN9ybFSKBqOk9Gxi/mOeB4@ifi.uio.no>
     [not found]     ` <fa.XLGLzP+T4fm9CkeATkS1VL/Yz4Q@ifi.uio.no>
     [not found]       ` <fa.z8sKLpwDO3qQ15ZJIm152YEty4I@ifi.uio.no>
     [not found]         ` <fa.KyW7dWWjiSFnFxwdZZLurmVn8qA@ifi.uio.no>
2008-09-20 10:10           ` Reading EeePC900 battery info causes stalls (was Re: How how latent should non-preemptive scheduling be?) Sitsofe Wheeler
2008-09-20 10:25             ` Alexey Starikovskiy
2008-09-20 10:51               ` Sitsofe Wheeler
2008-09-20 10:55                 ` Reading EeePC900 battery info causes stalls Sitsofe Wheeler
2008-09-20 11:14                   ` Alexey Starikovskiy
2008-09-20 11:23                     ` Sitsofe Wheeler
2008-09-20 11:41                       ` Sitsofe Wheeler
2008-09-20 12:34                         ` Alexey Starikovskiy
2008-09-20 12:50                           ` Sitsofe Wheeler
2008-09-20 13:07                       ` Alexey Starikovskiy [this message]
2008-09-20 13:30                         ` Sitsofe Wheeler
2008-09-20 13:59             ` Reading EeePC900 battery info causes stalls (was Re: How how latent should non-preemptive scheduling be?) Steven Rostedt
2008-09-20 14:11               ` Sitsofe Wheeler
2008-09-20 14:37                 ` Steven Rostedt
2008-09-20 17:16                   ` Reading EeePC900 battery info causes stalls Sitsofe Wheeler
2008-09-20 21:53                     ` Steven Rostedt
2008-09-20 23:18                       ` Sitsofe Wheeler
2008-09-21  7:09                         ` Ingo Molnar
2008-09-22  6:24                       ` Sitsofe Wheeler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48D4F57C.5010902@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sitsofe@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®