aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r--drivers/acpi/sysfs.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index f8588f81048a..77255f250dbb 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -220,6 +220,14 @@ module_param_call(trace_state, param_set_trace_state, param_get_trace_state,
220 NULL, 0644); 220 NULL, 0644);
221#endif /* CONFIG_ACPI_DEBUG */ 221#endif /* CONFIG_ACPI_DEBUG */
222 222
223
224/* /sys/modules/acpi/parameters/aml_debug_output */
225
226module_param_named(aml_debug_output, acpi_gbl_enable_aml_debug_object,
227 bool, 0644);
228MODULE_PARM_DESC(aml_debug_output,
229 "To enable/disable the ACPI Debug Object output.");
230
223/* /sys/module/acpi/parameters/acpica_version */ 231/* /sys/module/acpi/parameters/acpica_version */
224static int param_get_acpica_version(char *buffer, struct kernel_param *kp) 232static int param_get_acpica_version(char *buffer, struct kernel_param *kp)
225{ 233{
@@ -438,7 +446,7 @@ static void delete_gpe_attr_array(void)
438 return; 446 return;
439} 447}
440 448
441void acpi_os_gpe_count(u32 gpe_number) 449static void gpe_count(u32 gpe_number)
442{ 450{
443 acpi_gpe_count++; 451 acpi_gpe_count++;
444 452
@@ -454,7 +462,7 @@ void acpi_os_gpe_count(u32 gpe_number)
454 return; 462 return;
455} 463}
456 464
457void acpi_os_fixed_event_count(u32 event_number) 465static void fixed_event_count(u32 event_number)
458{ 466{
459 if (!all_counters) 467 if (!all_counters)
460 return; 468 return;
@@ -468,6 +476,16 @@ void acpi_os_fixed_event_count(u32 event_number)
468 return; 476 return;
469} 477}
470 478
479static void acpi_gbl_event_handler(u32 event_type, acpi_handle device,
480 u32 event_number, void *context)
481{
482 if (event_type == ACPI_EVENT_TYPE_GPE)
483 gpe_count(event_number);
484
485 if (event_type == ACPI_EVENT_TYPE_FIXED)
486 fixed_event_count(event_number);
487}
488
471static int get_status(u32 index, acpi_event_status *status, 489static int get_status(u32 index, acpi_event_status *status,
472 acpi_handle *handle) 490 acpi_handle *handle)
473{ 491{
@@ -601,6 +619,7 @@ end:
601 619
602void acpi_irq_stats_init(void) 620void acpi_irq_stats_init(void)
603{ 621{
622 acpi_status status;
604 int i; 623 int i;
605 624
606 if (all_counters) 625 if (all_counters)
@@ -619,6 +638,10 @@ void acpi_irq_stats_init(void)
619 if (all_counters == NULL) 638 if (all_counters == NULL)
620 goto fail; 639 goto fail;
621 640
641 status = acpi_install_global_event_handler(acpi_gbl_event_handler, NULL);
642 if (ACPI_FAILURE(status))
643 goto fail;
644
622 counter_attrs = kzalloc(sizeof(struct kobj_attribute) * (num_counters), 645 counter_attrs = kzalloc(sizeof(struct kobj_attribute) * (num_counters),
623 GFP_KERNEL); 646 GFP_KERNEL);
624 if (counter_attrs == NULL) 647 if (counter_attrs == NULL)