diff options
author | Lv Zheng <lv.zheng@intel.com> | 2013-10-31 05:30:28 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-31 17:37:33 +0400 |
commit | 9187a415fd119c1d89a5ad2fd05513cd43699ebf (patch) | |
tree | 7f6c80246b49b42b8ae119c090b595c9754f3341 /drivers/acpi/acpica/utxface.c | |
parent | fa5f508f942faaf73ae5020db7a4189d5ca88d2a (diff) | |
download | linux-9187a415fd119c1d89a5ad2fd05513cd43699ebf.tar.xz |
ACPICA: Add new statistics interface.
This patch ports new counters and statistics interface, already
implemented in ACPICA upstream, to Linux. That helps to reduce
source code differences between Linux and ACPICA upstream.
[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utxface.c')
-rw-r--r-- | drivers/acpi/acpica/utxface.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c index 891a37b69d3c..39869022a417 100644 --- a/drivers/acpi/acpica/utxface.c +++ b/drivers/acpi/acpica/utxface.c @@ -208,6 +208,44 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) ACPI_EXPORT_SYMBOL(acpi_get_system_info) +/******************************************************************************* + * + * FUNCTION: acpi_get_statistics + * + * PARAMETERS: stats - Where the statistics are returned + * + * RETURN: status - the status of the call + * + * DESCRIPTION: Get the contents of the various system counters + * + ******************************************************************************/ +acpi_status acpi_get_statistics(struct acpi_statistics *stats) +{ + ACPI_FUNCTION_TRACE(acpi_get_statistics); + + /* Parameter validation */ + + if (!stats) { + return_ACPI_STATUS(AE_BAD_PARAMETER); + } + + /* Various interrupt-based event counters */ + + stats->sci_count = acpi_sci_count; + stats->gpe_count = acpi_gpe_count; + + ACPI_MEMCPY(stats->fixed_event_count, acpi_fixed_event_count, + sizeof(acpi_fixed_event_count)); + + /* Other counters */ + + stats->method_count = acpi_method_count; + + return_ACPI_STATUS(AE_OK); +} + +ACPI_EXPORT_SYMBOL(acpi_get_statistics) + /***************************************************************************** * * FUNCTION: acpi_install_initialization_handler |