* [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue
@ 2009-12-30 12:53 Alexey Starikovskiy
2009-12-30 12:53 ` [PATCH 2/2] ACPI: EC: Add wait for irq storm Alexey Starikovskiy
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alexey Starikovskiy @ 2009-12-30 12:53 UTC (permalink / raw)
To: Len Brown; +Cc: Linux-acpi
SBS transactions should happen in Notify work queue, to not create
a dead lock with GPE execution accessing SBS devices.
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
drivers/acpi/ec.c | 3 ++-
drivers/acpi/sbshc.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 9cc3885..32517d4 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -535,7 +535,8 @@ static int acpi_ec_sync_query(struct acpi_ec *ec)
return -ENOMEM;
memcpy(copy, handler, sizeof(*copy));
pr_debug(PREFIX "push query execution (0x%2x) on queue\n", value);
- return acpi_os_execute(OSL_GPE_HANDLER,
+ return acpi_os_execute((copy->func) ?
+ OSL_NOTIFY_HANDLER : OSL_GPE_HANDLER,
acpi_ec_run, copy);
}
}
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index d933980..fd09229 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -242,7 +242,7 @@ static int smbus_alarm(void *context)
case ACPI_SBS_CHARGER:
case ACPI_SBS_MANAGER:
case ACPI_SBS_BATTERY:
- acpi_os_execute(OSL_GPE_HANDLER,
+ acpi_os_execute(OSL_NOTIFY_HANDLER,
acpi_smbus_callback, hc);
default:;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] ACPI: EC: Add wait for irq storm
2009-12-30 12:53 [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue Alexey Starikovskiy
@ 2009-12-30 12:53 ` Alexey Starikovskiy
2009-12-31 8:29 ` Len Brown
2009-12-31 8:25 ` [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue Len Brown
2009-12-31 8:29 ` Len Brown
2 siblings, 1 reply; 5+ messages in thread
From: Alexey Starikovskiy @ 2009-12-30 12:53 UTC (permalink / raw)
To: Len Brown; +Cc: Linux-acpi
Merge of poll and irq modes accelerated EC transaction, so
that keyboard starts to suffer again. Add msleep(1) into
transaction path for the storm to allow keyboard controller
to do its job.
Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14747
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
drivers/acpi/ec.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 32517d4..edfcbc7 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -259,7 +259,6 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
spin_unlock_irqrestore(&ec->curr_lock, tmp);
ret = ec_poll(ec);
- pr_debug(PREFIX "transaction end\n");
spin_lock_irqsave(&ec->curr_lock, tmp);
ec->curr = NULL;
spin_unlock_irqrestore(&ec->curr_lock, tmp);
@@ -316,6 +315,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)
/* check if we received SCI during transaction */
ec_check_sci_sync(ec, acpi_ec_read_status(ec));
if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
+ msleep(1);
/* it is safe to enable GPE outside of transaction */
acpi_enable_gpe(NULL, ec->gpe);
} else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) {
@@ -323,6 +323,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)
"transactions will use polling mode\n");
set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
}
+ pr_debug(PREFIX "transaction end\n");
end:
if (ec->global_lock)
acpi_release_global_lock(glk);
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue
2009-12-30 12:53 [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue Alexey Starikovskiy
2009-12-30 12:53 ` [PATCH 2/2] ACPI: EC: Add wait for irq storm Alexey Starikovskiy
@ 2009-12-31 8:25 ` Len Brown
2009-12-31 8:29 ` Len Brown
2 siblings, 0 replies; 5+ messages in thread
From: Len Brown @ 2009-12-31 8:25 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: Linux-acpi
ERROR: trailing whitespace
#27: FILE: drivers/acpi/ec.c:538:
+^I^I^Ireturn acpi_os_execute((copy->func) ? $
total: 1 errors, 0 warnings, 17 lines checked
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue
2009-12-30 12:53 [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue Alexey Starikovskiy
2009-12-30 12:53 ` [PATCH 2/2] ACPI: EC: Add wait for irq storm Alexey Starikovskiy
2009-12-31 8:25 ` [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue Len Brown
@ 2009-12-31 8:29 ` Len Brown
2 siblings, 0 replies; 5+ messages in thread
From: Len Brown @ 2009-12-31 8:29 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: Linux-acpi
applied to acpi-test
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-31 8:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30 12:53 [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue Alexey Starikovskiy
2009-12-30 12:53 ` [PATCH 2/2] ACPI: EC: Add wait for irq storm Alexey Starikovskiy
2009-12-31 8:29 ` Len Brown
2009-12-31 8:25 ` [PATCH 1/2] ACPI: SBS: Move SBS HC callback to faster Notify queue Len Brown
2009-12-31 8:29 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox