Skip to contentSkip to conversation

ARM: OMAP3: Clean up spurious interrupt check logic

PATCH In review Roger Quadros 2 participants 4 messages Apr 2, 2009 – Apr 3, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP3: Clean up spurious interrupt check logic

From: Roger Quadros <[email protected]>
Date: Thu, 2 Apr 2009 16:41:00 +0300
Subject: [PATCH] ARM: OMAP3: Clean up spurious interrupt check logic

SPURIOUSIRQ is contained in bits 31:7 of INTC_SIR, so INTC_SIR must be right shifted by 7, not 6.

No change in logic, only changes for better readability. Refer to register definition of INTCPS_SIR_IRQ in OMAP3 Manual.

---
arch/arm/mach-omap2/irq.c | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/irq.c +0 -0
index 2842fe8..296ab86 100644
@@ -73,9 +73,9 @@ static int omap_check_spurious(unsigned int irq)
	u32 sir, spurious;

	sir = intc_bank_read_reg(&irq_banks[0], INTC_SIR);

- spurious = sir >> 6;
+ spurious = sir >> 7;

- if (spurious > 1) {

+	if (spurious) {
		printk(KERN_WARNING "Spurious irq %i: 0x%08x, please flush "
					"posted write for irq %i\n",
					irq, sir, previous_irq);
Signature · 1 line
1.5.6.5
maintainer
#1 lore raw
Quoted 9 lines · Roger Quadros

From: Roger Quadros <[email protected]>
Date: Thu, 2 Apr 2009 16:41:00 +0300
Subject: [PATCH] ARM: OMAP3: Clean up spurious interrupt check logic

SPURIOUSIRQ is contained in bits 31:7 of INTC_SIR, so INTC_SIR must be right shifted by 7, not 6.

No change in logic, only changes for better readability. Refer to register definition of INTCPS_SIR_IRQ in OMAP3 Manual.

Argh, that bug explains why I could not figure out the meaning of the first spurious bit.. :)

I guess the spurious bit value is still on or off instead of actually telling the previous spurious irq number though.

Tony

Quoted 25 lines

---
arch/arm/mach-omap2/irq.c | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/irq.c +2 -2
index 2842fe8..296ab86 100644
@@ -73,9 +73,9 @@ static int omap_check_spurious(unsigned int irq)
 	u32 sir, spurious;
 
 	sir = intc_bank_read_reg(&irq_banks[0], INTC_SIR);
-	spurious = sir >> 6;
+	spurious = sir >> 7;
 
-	if (spurious > 1) {
+	if (spurious) {
 		printk(KERN_WARNING "Spurious irq %i: 0x%08x, please flush "
 					"posted write for irq %i\n",
 					irq, sir, previous_irq);
Signature · 1 line
1.5.6.5
#2 lore raw
Quoted 13 lines · ext Tony Lindgren
Quoted 10 lines · Roger Quadros

From: Roger Quadros <[email protected]>
Date: Thu, 2 Apr 2009 16:41:00 +0300
Subject: [PATCH] ARM: OMAP3: Clean up spurious interrupt check logic

SPURIOUSIRQ is contained in bits 31:7 of INTC_SIR, so INTC_SIR must be right shifted by 7, not 6.

No change in logic, only changes for better readability. Refer to register definition of INTCPS_SIR_IRQ in OMAP3 Manual.

Quoted 9 lines

Argh, that bug explains why I could not figure out the meaning of the first spurious bit.. :)

I guess the spurious bit value is still on or off instead of actually telling the previous spurious irq number though.

Tony

Yes Tony you are right.

-roger

Quoted 28 lines
Quoted 26 lines

---
arch/arm/mach-omap2/irq.c | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/irq.c +2 -2
index 2842fe8..296ab86 100644
@@ -73,9 +73,9 @@ static int omap_check_spurious(unsigned int irq)
 	u32 sir, spurious;
 
 	sir = intc_bank_read_reg(&irq_banks[0], INTC_SIR);
-	spurious = sir >> 6;
+	spurious = sir >> 7;
 
-	if (spurious > 1) {
+	if (spurious) {
 		printk(KERN_WARNING "Spurious irq %i: 0x%08x, please flush "
 					"posted write for irq %i\n",
 					irq, sir, previous_irq);
Signature · 1 line
1.5.6.5