import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / kernel / irq.c
index 9723d17b8f38552212b8540aaadc10dd4442fc2b..eb04629442a02b24a9f9b6a1957e8e20b3e433ba 100644 (file)
@@ -42,6 +42,7 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 
+#include <linux/mt_sched_mon.h>
 unsigned long irq_err_count;
 
 int arch_show_interrupts(struct seq_file *p, int prec)
@@ -56,6 +57,10 @@ int arch_show_interrupts(struct seq_file *p, int prec)
        return 0;
 }
 
+#ifdef CONFIG_MTK_SCHED_TRACERS
+#include <trace/events/mtk_events.h>
+#endif
+
 /*
  * handle_IRQ handles all hardware IRQ's.  Decoded IRQs should
  * not come via this function.  Instead, they should provide their
@@ -65,8 +70,17 @@ int arch_show_interrupts(struct seq_file *p, int prec)
 void handle_IRQ(unsigned int irq, struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
+#ifdef CONFIG_MTK_SCHED_TRACERS
+    struct irq_desc *desc;
+#endif
 
        irq_enter();
+    mt_trace_ISR_start(irq);
+#ifdef CONFIG_MTK_SCHED_TRACERS
+    desc = irq_to_desc(irq);
+    trace_irq_entry(irq,
+            (desc && desc->action && desc->action->name) ? desc->action->name : "-");
+#endif
 
        /*
         * Some hardware gives randomly wrong interrupts.  Rather
@@ -79,7 +93,10 @@ void handle_IRQ(unsigned int irq, struct pt_regs *regs)
        } else {
                generic_handle_irq(irq);
        }
-
+#ifdef CONFIG_MTK_SCHED_TRACERS
+    trace_irq_exit(irq);
+#endif
+    mt_trace_ISR_end(irq);
        irq_exit();
        set_irq_regs(old_regs);
 }