diff options
author | shaojie.sun <shaojie.sun@linaro.org> | 2013-10-31 06:50:50 +0800 |
---|---|---|
committer | shaojie.sun <shaojie.sun@linaro.org> | 2013-10-31 06:50:50 +0800 |
commit | fd1126f272c62531329ccc892977c7406728726b (patch) | |
tree | 2978be6382deba8902a0d87c649e3b6ad623a0d8 | |
parent | 1ae299222860a2b6943f6f631a153f0cd6f90e88 (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.c | 9 | ||||
-rw-r--r-- | idlestat.h | 1 |
2 files changed, 10 insertions, 0 deletions
@@ -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; } @@ -28,6 +28,7 @@ struct cpuidle_cstate { enum IRQ_TYPE { HARD_IRQ = 0, + IPI_IRQ, IRQ_TYPE_MAX }; |