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.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org --- drivers/acpi/sci_emu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/sci_emu.c b/drivers/acpi/sci_emu.c index 2f13ca1..08af8e9 100644 --- a/drivers/acpi/sci_emu.c +++ b/drivers/acpi/sci_emu.c @@ -55,7 +55,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
On 2013-9-20 0:16, Tomasz Nowicki wrote:
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.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org
Acked-by: Hanjun Guo hanjun.guo@linaro.org
drivers/acpi/sci_emu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/sci_emu.c b/drivers/acpi/sci_emu.c index 2f13ca1..08af8e9 100644 --- a/drivers/acpi/sci_emu.c +++ b/drivers/acpi/sci_emu.c @@ -55,7 +55,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