summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Nowicki <tomasz.nowicki@linaro.org>2013-09-19 18:15:05 +0200
committerFu Wei <fu.wei@linaro.org>2015-09-07 16:00:17 +0800
commitc0c17c533019fd0ffffb5c0843d73a8a13ddc607 (patch)
tree0e8872a7606f3ff32895492fb64b80caeddd2900
parentd8458ac33b701b524a787be85d94e2a71836ce5a (diff)
ACPI: Expand SCI_EMULATE patch toward more generic usage.acpi-topic-arm64-apei
ACPI spec define that devices can be notified with some well defined values. Handlers from system list are called for notify values within 0-0x7F. In turn, handlers from device list are called for notify value greater than 0x80. Till now only system handler could be called. Now we are able to notify devices with all notify values range that means we can emulate SCI line e.g. to trigger APCI errors. [Fu Wei: Fix a little code style problem] Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Fu Wei <fu.wei@linaro.org>
-rw-r--r--drivers/acpi/sci_emu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/acpi/sci_emu.c b/drivers/acpi/sci_emu.c
index f6e69e56cf01..b02e35c727b5 100644
--- a/drivers/acpi/sci_emu.c
+++ b/drivers/acpi/sci_emu.c
@@ -56,7 +56,10 @@ static void sci_notify_client(char *acpi_name, u32 event)
*/
obj_desc = acpi_ns_get_attached_object(node);
if (obj_desc) {
- if (obj_desc->common_notify.notify_list[0]) {
+ if ((event <= ACPI_MAX_SYS_NOTIFY &&
+ obj_desc->common_notify.notify_list[ACPI_SYSTEM_HANDLER_LIST]) ||
+ (event > ACPI_MAX_SYS_NOTIFY &&
+ obj_desc->common_notify.notify_list[ACPI_DEVICE_HANDLER_LIST])) {
/*
* Release the lock and queue the item for later
* exectuion