diff options
author | Zhang Rui <rui.zhang@intel.com> | 2008-06-19 21:42:47 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:04 -0400 |
commit | 71b58cbb0c30d1f78636a48c4721529449d6ea37 (patch) | |
tree | b2271201121c7ecd4d275b19772dcc1e64575712 /drivers/acpi/events/evxfevnt.c | |
parent | 9c9f6d052dc6f469431461a97d49cf9c5558b8ad (diff) |
ACPI: Enhance /sys/firmware/interrupts to allow enable/disable/clear from user-space
Allow users to enable/disable/clear a specific & valid GPE/Fixed Event
in user space.
This is useful for debugging, especially for some
interrupt storm issues.
All wakeup GPEs are disabled and they can not be enabled at runtime,
and we mark them as invalid.
All GPEs that don't have a _Lxx/_Exx method are marked as invalid.
All Fixed Events that don't have an event handler are marked as invalid
and they can't be enabled until an event handler is registered.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Ling Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/acpi/events/evxfevnt.c')
-rw-r--r-- | drivers/acpi/events/evxfevnt.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index 99a7502e6a87..73bfd6bf962f 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c | |||
@@ -472,7 +472,6 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | |||
472 | } | 472 | } |
473 | 473 | ||
474 | ACPI_EXPORT_SYMBOL(acpi_clear_gpe) | 474 | ACPI_EXPORT_SYMBOL(acpi_clear_gpe) |
475 | #ifdef ACPI_FUTURE_USAGE | ||
476 | /******************************************************************************* | 475 | /******************************************************************************* |
477 | * | 476 | * |
478 | * FUNCTION: acpi_get_event_status | 477 | * FUNCTION: acpi_get_event_status |
@@ -489,6 +488,7 @@ ACPI_EXPORT_SYMBOL(acpi_clear_gpe) | |||
489 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | 488 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) |
490 | { | 489 | { |
491 | acpi_status status = AE_OK; | 490 | acpi_status status = AE_OK; |
491 | u32 value; | ||
492 | 492 | ||
493 | ACPI_FUNCTION_TRACE(acpi_get_event_status); | 493 | ACPI_FUNCTION_TRACE(acpi_get_event_status); |
494 | 494 | ||
@@ -506,7 +506,20 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | |||
506 | 506 | ||
507 | status = | 507 | status = |
508 | acpi_get_register(acpi_gbl_fixed_event_info[event]. | 508 | acpi_get_register(acpi_gbl_fixed_event_info[event]. |
509 | status_register_id, event_status); | 509 | enable_register_id, &value); |
510 | if (ACPI_FAILURE(status)) | ||
511 | return_ACPI_STATUS(status); | ||
512 | |||
513 | *event_status = value; | ||
514 | |||
515 | status = | ||
516 | acpi_get_register(acpi_gbl_fixed_event_info[event]. | ||
517 | status_register_id, &value); | ||
518 | if (ACPI_FAILURE(status)) | ||
519 | return_ACPI_STATUS(status); | ||
520 | |||
521 | if (value) | ||
522 | *event_status |= ACPI_EVENT_FLAG_SET; | ||
510 | 523 | ||
511 | return_ACPI_STATUS(status); | 524 | return_ACPI_STATUS(status); |
512 | } | 525 | } |
@@ -566,7 +579,6 @@ acpi_get_gpe_status(acpi_handle gpe_device, | |||
566 | } | 579 | } |
567 | 580 | ||
568 | ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) | 581 | ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) |
569 | #endif /* ACPI_FUTURE_USAGE */ | ||
570 | /******************************************************************************* | 582 | /******************************************************************************* |
571 | * | 583 | * |
572 | * FUNCTION: acpi_install_gpe_block | 584 | * FUNCTION: acpi_install_gpe_block |