aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-acpi8
-rw-r--r--drivers/acpi/osl.c4
-rw-r--r--drivers/acpi/system.c11
-rw-r--r--include/linux/acpi.h1
4 files changed, 19 insertions, 5 deletions
diff --git a/Documentation/ABI/testing/sysfs-firmware-acpi b/Documentation/ABI/testing/sysfs-firmware-acpi
index e8ffc70ffe12..4f9ba3c2fca7 100644
--- a/Documentation/ABI/testing/sysfs-firmware-acpi
+++ b/Documentation/ABI/testing/sysfs-firmware-acpi
@@ -69,9 +69,13 @@ Description:
69 gpe1F: 0 invalid 69 gpe1F: 0 invalid
70 gpe_all: 1192 70 gpe_all: 1192
71 sci: 1194 71 sci: 1194
72 sci_not: 0
72 73
73 sci - The total number of times the ACPI SCI 74 sci - The number of times the ACPI SCI
74 has claimed an interrupt. 75 has been called and claimed an interrupt.
76
77 sci_not - The number of times the ACPI SCI
78 has been called and NOT claimed an interrupt.
75 79
76 gpe_all - count of SCI caused by GPEs. 80 gpe_all - count of SCI caused by GPEs.
77 81
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
360acpi_status 362acpi_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
40u32 acpi_irq_handled; 40u32 acpi_irq_handled;
41u32 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
220struct event_counter { 222struct 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
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 6586cbd0d4af..88be890ee3c7 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -111,6 +111,7 @@ int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
111int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); 111int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
112void acpi_irq_stats_init(void); 112void acpi_irq_stats_init(void);
113extern u32 acpi_irq_handled; 113extern u32 acpi_irq_handled;
114extern u32 acpi_irq_not_handled;
114 115
115extern struct acpi_mcfg_allocation *pci_mmcfg_config; 116extern struct acpi_mcfg_allocation *pci_mmcfg_config;
116extern int pci_mmcfg_config_num; 117extern int pci_mmcfg_config_num;