|
@@ -37,6 +37,24 @@ void mips_set_clock_mode(enum clock_event_mode mode,
|
|
DEFINE_PER_CPU(struct clock_event_device, mips_clockevent_device);
|
|
DEFINE_PER_CPU(struct clock_event_device, mips_clockevent_device);
|
|
int cp0_timer_irq_installed;
|
|
int cp0_timer_irq_installed;
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Possibly handle a performance counter interrupt.
|
|
|
|
+ * Return true if the timer interrupt should not be checked
|
|
|
|
+ */
|
|
|
|
+static inline int handle_perf_irq(int r2)
|
|
|
|
+{
|
|
|
|
+ /*
|
|
|
|
+ * The performance counter overflow interrupt may be shared with the
|
|
|
|
+ * timer interrupt (cp0_perfcount_irq < 0). If it is and a
|
|
|
|
+ * performance counter has overflowed (perf_irq() == IRQ_HANDLED)
|
|
|
|
+ * and we can't reliably determine if a counter interrupt has also
|
|
|
|
+ * happened (!r2) then don't check for a timer interrupt.
|
|
|
|
+ */
|
|
|
|
+ return (cp0_perfcount_irq < 0) &&
|
|
|
|
+ perf_irq() == IRQ_HANDLED &&
|
|
|
|
+ !r2;
|
|
|
|
+}
|
|
|
|
+
|
|
irqreturn_t c0_compare_interrupt(int irq, void *dev_id)
|
|
irqreturn_t c0_compare_interrupt(int irq, void *dev_id)
|
|
{
|
|
{
|
|
const int r2 = cpu_has_mips_r2_r6;
|
|
const int r2 = cpu_has_mips_r2_r6;
|