diff options
author | Len Brown <len.brown@intel.com> | 2009-04-21 00:35:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-21 00:35:47 -0400 |
commit | 88bea188b85f9cefefbbd56b8a48d0f798409177 (patch) | |
tree | 8170590416c90c4bec1c00c6e3d472cab3b84e6f /drivers/acpi | |
parent | a939b96cccdb65df80a52447ec8e4a6d79c56dbb (diff) |
ACPI: add /sys/firmware/acpi/interrupts/sci_not counter
This counter may prove useful in debugging some
spurious interrupt issues seen in the field.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/osl.c | 4 | ||||
-rw-r--r-- | drivers/acpi/system.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index d59f08ecaf16..d916bea729f1 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -353,8 +353,10 @@ static irqreturn_t acpi_irq(int irq, void *dev_id) | |||
353 | if (handled) { | 353 | if (handled) { |
354 | acpi_irq_handled++; | 354 | acpi_irq_handled++; |
355 | return IRQ_HANDLED; | 355 | return IRQ_HANDLED; |
356 | } else | 356 | } else { |
357 | acpi_irq_not_handled++; | ||
357 | return IRQ_NONE; | 358 | return IRQ_NONE; |
359 | } | ||
358 | } | 360 | } |
359 | 361 | ||
360 | acpi_status | 362 | acpi_status |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index da51f05ef8d8..0944daec064f 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
@@ -38,6 +38,7 @@ ACPI_MODULE_NAME("system"); | |||
38 | #define ACPI_SYSTEM_DEVICE_NAME "System" | 38 | #define ACPI_SYSTEM_DEVICE_NAME "System" |
39 | 39 | ||
40 | u32 acpi_irq_handled; | 40 | u32 acpi_irq_handled; |
41 | u32 acpi_irq_not_handled; | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Make ACPICA version work as module param | 44 | * Make ACPICA version work as module param |
@@ -214,8 +215,9 @@ err: | |||
214 | 215 | ||
215 | #define COUNT_GPE 0 | 216 | #define COUNT_GPE 0 |
216 | #define COUNT_SCI 1 /* acpi_irq_handled */ | 217 | #define COUNT_SCI 1 /* acpi_irq_handled */ |
217 | #define COUNT_ERROR 2 /* other */ | 218 | #define COUNT_SCI_NOT 2 /* acpi_irq_not_handled */ |
218 | #define NUM_COUNTERS_EXTRA 3 | 219 | #define COUNT_ERROR 3 /* other */ |
220 | #define NUM_COUNTERS_EXTRA 4 | ||
219 | 221 | ||
220 | struct event_counter { | 222 | struct event_counter { |
221 | u32 count; | 223 | u32 count; |
@@ -317,6 +319,8 @@ static ssize_t counter_show(struct kobject *kobj, | |||
317 | 319 | ||
318 | all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI].count = | 320 | all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI].count = |
319 | acpi_irq_handled; | 321 | acpi_irq_handled; |
322 | all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI_NOT].count = | ||
323 | acpi_irq_not_handled; | ||
320 | all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_GPE].count = | 324 | all_counters[num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_GPE].count = |
321 | acpi_gpe_count; | 325 | acpi_gpe_count; |
322 | 326 | ||
@@ -363,6 +367,7 @@ static ssize_t counter_set(struct kobject *kobj, | |||
363 | all_counters[i].count = 0; | 367 | all_counters[i].count = 0; |
364 | acpi_gpe_count = 0; | 368 | acpi_gpe_count = 0; |
365 | acpi_irq_handled = 0; | 369 | acpi_irq_handled = 0; |
370 | acpi_irq_not_handled = 0; | ||
366 | goto end; | 371 | goto end; |
367 | } | 372 | } |
368 | 373 | ||
@@ -456,6 +461,8 @@ void acpi_irq_stats_init(void) | |||
456 | sprintf(buffer, "gpe_all"); | 461 | sprintf(buffer, "gpe_all"); |
457 | else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI) | 462 | else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI) |
458 | sprintf(buffer, "sci"); | 463 | sprintf(buffer, "sci"); |
464 | else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_SCI_NOT) | ||
465 | sprintf(buffer, "sci_not"); | ||
459 | else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_ERROR) | 466 | else if (i == num_gpes + ACPI_NUM_FIXED_EVENTS + COUNT_ERROR) |
460 | sprintf(buffer, "error"); | 467 | sprintf(buffer, "error"); |
461 | else | 468 | else |