aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utxface.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2013-10-30 21:30:28 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-31 09:37:33 -0400
commit9187a415fd119c1d89a5ad2fd05513cd43699ebf (patch)
tree7f6c80246b49b42b8ae119c090b595c9754f3341 /drivers/acpi/acpica/utxface.c
parentfa5f508f942faaf73ae5020db7a4189d5ca88d2a (diff)
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.c38
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)
208 208
209ACPI_EXPORT_SYMBOL(acpi_get_system_info) 209ACPI_EXPORT_SYMBOL(acpi_get_system_info)
210 210
211/*******************************************************************************
212 *
213 * FUNCTION: acpi_get_statistics
214 *
215 * PARAMETERS: stats - Where the statistics are returned
216 *
217 * RETURN: status - the status of the call
218 *
219 * DESCRIPTION: Get the contents of the various system counters
220 *
221 ******************************************************************************/
222acpi_status acpi_get_statistics(struct acpi_statistics *stats)
223{
224 ACPI_FUNCTION_TRACE(acpi_get_statistics);
225
226 /* Parameter validation */
227
228 if (!stats) {
229 return_ACPI_STATUS(AE_BAD_PARAMETER);
230 }
231
232 /* Various interrupt-based event counters */
233
234 stats->sci_count = acpi_sci_count;
235 stats->gpe_count = acpi_gpe_count;
236
237 ACPI_MEMCPY(stats->fixed_event_count, acpi_fixed_event_count,
238 sizeof(acpi_fixed_event_count));
239
240 /* Other counters */
241
242 stats->method_count = acpi_method_count;
243
244 return_ACPI_STATUS(AE_OK);
245}
246
247ACPI_EXPORT_SYMBOL(acpi_get_statistics)
248
211/***************************************************************************** 249/*****************************************************************************
212 * 250 *
213 * FUNCTION: acpi_install_initialization_handler 251 * FUNCTION: acpi_install_initialization_handler