Skip to contentSkip to conversation

MIPS: add IRQF_TIMER flag for Timer Interrupts

PATCH In review Wu Zhangjin 2 participants 3 messages Oct 9, 2009 – Oct 11, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: add IRQF_TIMER flag for Timer Interrupts

This patch add IRQF_TIMER flag for all Timer interrupts in linux-MIPS, which will help to not disable the Timer IRQ when suspending to ensure resuming normally(d6c585a4342a2ff627a29f9aea77c5ed4cd76023) and not thread them when enabled PREEMPT_RT.

NOTE: Perhaps there are also some board-specific Timer interrupts missing here!

(This -v1 version Incorporated the feedback from Atsushi Nemoto
<[email protected]>.)

---
 arch/mips/jazz/irq.c                |    2 +-
 arch/mips/kernel/cevt-bcm1480.c     |    2 +-
 arch/mips/kernel/cevt-ds1287.c      |    2 +-
 arch/mips/kernel/cevt-gt641xx.c     |    2 +-
 arch/mips/kernel/cevt-r4k.c         |    2 +-
 arch/mips/kernel/cevt-sb1250.c      |    2 +-
 arch/mips/kernel/cevt-txx9.c        |    2 +-
 arch/mips/kernel/i8253.c            |    2 +-
 arch/mips/nxp/pnx8550/common/int.c  |    2 +-
 arch/mips/nxp/pnx8550/common/time.c |    4 ++--
 arch/mips/sgi-ip27/ip27-timer.c     |    2 +-
 arch/mips/sni/time.c                |    2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)
arch/mips/jazz/irq.c +1 -1
index 7fd170d..7bd32d0 100644
@@ -134,7 +134,7 @@ static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction r4030_timer_irqaction = {
 	.handler	= r4030_timer_interrupt,
-	.flags		= IRQF_DISABLED,
+	.flags		= IRQF_DISABLED | IRQF_TIMER,
 	.name		= "R4030 timer",
 };
 
arch/mips/kernel/cevt-bcm1480.c +1 -1
index e02f79b..bfea327 100644
@@ -144,7 +144,7 @@ void __cpuinit sb1480_clockevent_init(void)
 	bcm1480_unmask_irq(cpu, irq);
 
 	action->handler	= sibyte_counter_handler;
-	action->flags	= IRQF_DISABLED | IRQF_PERCPU;
+	action->flags	= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER;
 	action->name	= name;
 	action->dev_id	= cd;
 
arch/mips/kernel/cevt-ds1287.c +1 -1
index 6996da4..00a4da2 100644
@@ -107,7 +107,7 @@ static irqreturn_t ds1287_interrupt(int irq, void *dev_id)
 
 static struct irqaction ds1287_irqaction = {
 	.handler	= ds1287_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
 	.name		= "ds1287",
 };
 
arch/mips/kernel/cevt-gt641xx.c +1 -1
index 92351e0..f5d265e 100644
@@ -113,7 +113,7 @@ static irqreturn_t gt641xx_timer0_interrupt(int irq, void *dev_id)
 
 static struct irqaction gt641xx_timer0_irqaction = {
 	.handler	= gt641xx_timer0_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
 	.name		= "gt641xx_timer0",
 };
 
arch/mips/kernel/cevt-r4k.c +1 -1
index 2652362..b469ad0 100644
@@ -83,7 +83,7 @@ out:
 
 struct irqaction c0_compare_irqaction = {
 	.handler = c0_compare_interrupt,
-	.flags = IRQF_DISABLED | IRQF_PERCPU,
+	.flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
 	.name = "timer",
 };
 
arch/mips/kernel/cevt-sb1250.c +1 -1
index ac5903d..da78eea 100644
@@ -143,7 +143,7 @@ void __cpuinit sb1250_clockevent_init(void)
 	sb1250_unmask_irq(cpu, irq);
 
 	action->handler	= sibyte_counter_handler;
-	action->flags	= IRQF_DISABLED | IRQF_PERCPU;
+	action->flags	= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER;
 	action->name	= name;
 	action->dev_id	= cd;
 
arch/mips/kernel/cevt-txx9.c +1 -1
index 0037f21..218ee6b 100644
@@ -146,7 +146,7 @@ static irqreturn_t txx9tmr_interrupt(int irq, void *dev_id)
 
 static struct irqaction txx9tmr_irq = {
 	.handler	= txx9tmr_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
 	.name		= "txx9tmr",
 	.dev_id		= &txx9_clock_event_device,
 };
arch/mips/kernel/i8253.c +1 -1
index f7d8d5d..ed5c441 100644
@@ -98,7 +98,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction irq0  = {
 	.handler = timer_interrupt,
-	.flags = IRQF_DISABLED | IRQF_NOBALANCING,
+	.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
 	.name = "timer"
 };
 
arch/mips/nxp/pnx8550/common/int.c +1 -1
index f080f11..7aca7d5 100644
@@ -172,7 +172,7 @@ static struct irqaction gic_action = {
 
 static struct irqaction timer_action = {
 	.handler =	no_action,
-	.flags =	IRQF_DISABLED,
+	.flags =	IRQF_DISABLED | IRQF_TIMER,
 	.name =		"Timer",
 };
 
arch/mips/nxp/pnx8550/common/time.c +2 -2
index 18b1927..8836c62 100644
@@ -59,7 +59,7 @@ static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction pnx8xxx_timer_irq = {
 	.handler	= pnx8xxx_timer_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
 	.name		= "pnx8xxx_timer",
 };
 
@@ -72,7 +72,7 @@ static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
 
 static struct irqaction monotonic_irqaction = {
 	.handler = monotonic_interrupt,
-	.flags = IRQF_DISABLED,
+	.flags = IRQF_DISABLED | IRQF_TIMER,
 	.name = "Monotonic timer",
 };
 
arch/mips/sgi-ip27/ip27-timer.c +1 -1
index 6d0e59f..d6802d6 100644
@@ -105,7 +105,7 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
 
 struct irqaction hub_rt_irqaction = {
 	.handler	= hub_rt_counter_handler,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
 	.name		= "hub-rt",
 };
 
arch/mips/sni/time.c +1 -1
index 62df6a5..f3b60e6 100644
@@ -67,7 +67,7 @@ static irqreturn_t a20r_interrupt(int irq, void *dev_id)
 
 static struct irqaction a20r_irqaction = {
 	.handler	= a20r_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
 	.name		= "a20r-timer",
 };
 
Signature · 1 line
1.6.2.1
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Wu Zhangjin

This patch add IRQF_TIMER flag for all Timer interrupts in linux-MIPS, which will help to not disable the Timer IRQ when suspending to ensure resuming normally(d6c585a4342a2ff627a29f9aea77c5ed4cd76023) and not thread them when enabled PREEMPT_RT.

NOTE: Perhaps there are also some board-specific Timer interrupts missing here!

(This -v1 version Incorporated the feedback from Atsushi Nemoto
<[email protected]>.)

Quoted 14 lines
---
 arch/mips/jazz/irq.c                |    2 +-
 arch/mips/kernel/cevt-bcm1480.c     |    2 +-
 arch/mips/kernel/cevt-ds1287.c      |    2 +-
 arch/mips/kernel/cevt-gt641xx.c     |    2 +-
 arch/mips/kernel/cevt-r4k.c         |    2 +-
 arch/mips/kernel/cevt-sb1250.c      |    2 +-
 arch/mips/kernel/cevt-txx9.c        |    2 +-
 arch/mips/kernel/i8253.c            |    2 +-
 arch/mips/nxp/pnx8550/common/int.c  |    2 +-
 arch/mips/nxp/pnx8550/common/time.c |    4 ++--
 arch/mips/sgi-ip27/ip27-timer.c     |    2 +-
 arch/mips/sni/time.c                |    2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

Thank you.

---
Atsushi Nemoto

Acked-by on v1 1/1
#2 lore raw
In reply to Wu Zhangjin
Quoted 14 lines · Wu Zhangjin

This patch add IRQF_TIMER flag for all Timer interrupts in linux-MIPS, which will help to not disable the Timer IRQ when suspending to ensure resuming normally(d6c585a4342a2ff627a29f9aea77c5ed4cd76023) and not thread them when enabled PREEMPT_RT.

NOTE: Perhaps there are also some board-specific Timer interrupts missing here!

(This -v1 version Incorporated the feedback from Atsushi Nemoto
<[email protected]>.)

Quoted 14 lines
---
 arch/mips/jazz/irq.c                |    2 +-
 arch/mips/kernel/cevt-bcm1480.c     |    2 +-
 arch/mips/kernel/cevt-ds1287.c      |    2 +-
 arch/mips/kernel/cevt-gt641xx.c     |    2 +-
 arch/mips/kernel/cevt-r4k.c         |    2 +-
 arch/mips/kernel/cevt-sb1250.c      |    2 +-
 arch/mips/kernel/cevt-txx9.c        |    2 +-
 arch/mips/kernel/i8253.c            |    2 +-
 arch/mips/nxp/pnx8550/common/int.c  |    2 +-
 arch/mips/nxp/pnx8550/common/time.c |    4 ++--
 arch/mips/sgi-ip27/ip27-timer.c     |    2 +-
 arch/mips/sni/time.c                |    2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

Thank you.

---
Atsushi Nemoto