aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshaojie.sun <shaojie.sun@linaro.org>2013-10-31 06:50:50 +0800
committershaojie.sun <shaojie.sun@linaro.org>2013-10-31 06:50:50 +0800
commitfd1126f272c62531329ccc892977c7406728726b (patch)
tree2978be6382deba8902a0d87c649e3b6ad623a0d8
parent1ae299222860a2b6943f6f631a153f0cd6f90e88 (diff)
add ipi irq wakeup source.lcu13-2
There are not only hard irq, but also ipi irq waking up cpu when cpu entered idle state. so we must add ipi irq info into wakeup source irq also. cpuX : enter idle cpuX : irq_handler_entry | ipi_handler_entry (count first irq) cpuX : exit idle Signed-off-by: shaojie.sun <shaojie.sun@linaro.org>
-rw-r--r--idlestat.c9
-rw-r--r--idlestat.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/idlestat.c b/idlestat.c
index 24f90f9..f38f0e9 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -20,6 +20,7 @@
static char irq_type_name[][8] = {
"irq",
+ "ipi",
};
static char buffer[BUFSIZE];
@@ -320,6 +321,7 @@ static int store_irq(int cpu, int irqid, char *irqname,
}
#define TRACE_IRQ_FORMAT "%*[^[][%d] %*[^=]=%d%*[^=]=%16s"
+#define TRACE_IPIIRQ_FORMAT "%*[^[][%d] %*[^=]=%d%*[^=]=%16s"
#define TRACE_CMD_FORMAT "%*[^]]] %lf:%*[^=]=%u%*[^=]=%d"
#define TRACE_FORMAT "%*[^]]] %*s %lf:%*[^=]=%u%*[^=]=%d"
@@ -336,6 +338,13 @@ static int get_wakeup_irq(struct cpuidle_datas *datas, char *buffer, int count)
return 0;
}
+ if (strstr(buffer, "ipi_handler_entry")) {
+ sscanf(buffer, TRACE_IPIIRQ_FORMAT, &cpu, &irqid, irqname);
+
+ store_irq(cpu, irqid, irqname, datas, count, IPI_IRQ);
+ return 0;
+ }
+
return -1;
}
diff --git a/idlestat.h b/idlestat.h
index 40d5d61..f753dc0 100644
--- a/idlestat.h
+++ b/idlestat.h
@@ -28,6 +28,7 @@ struct cpuidle_cstate {
enum IRQ_TYPE {
HARD_IRQ = 0,
+ IPI_IRQ,
IRQ_TYPE_MAX
};