瀏覽代碼

Revert "Remove dead CONFIG_SIBYTE_BCM1480_PROF"

This reverts commit 22c1d8b4f8f04882046ebe592f9a9eaea443cb45. It has
been nacked by MIPS maintainer Ralf Baechle.
Jiri Kosina 15 年之前
父節點
當前提交
15676295e1
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      arch/mips/sibyte/bcm1480/irq.c

+ 11 - 0
arch/mips/sibyte/bcm1480/irq.c

@@ -362,8 +362,19 @@ asmlinkage void plat_irq_dispatch(void)
 	unsigned int cpu = smp_processor_id();
 	unsigned int pending;
 
+#ifdef CONFIG_SIBYTE_BCM1480_PROF
+	/* Set compare to count to silence count/compare timer interrupts */
+	write_c0_compare(read_c0_count());
+#endif
+
 	pending = read_c0_cause() & read_c0_status();
 
+#ifdef CONFIG_SIBYTE_BCM1480_PROF
+	if (pending & CAUSEF_IP7)	/* Cpu performance counter interrupt */
+		sbprof_cpu_intr();
+	else
+#endif
+
 	if (pending & CAUSEF_IP4)
 		do_IRQ(K_BCM1480_INT_TIMER_0 + cpu);
 #ifdef CONFIG_SMP