public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Possible bug in 8250.c
@ 2011-08-20  0:58 Ivica Mikec
  2011-08-20 16:21 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Ivica Mikec @ 2011-08-20  0:58 UTC (permalink / raw)
  To: Jiri Slaby, mikeci; +Cc: linux-kernel

I traced the function using jtag debugger. 

UART is not sharing interrupts:
========================================= Console ========================
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xae023400 (irq = 53) is a 16550A
console [ttyS0] enabled, bootconsole disabled
=========================================================================
And /proc/interrupts:

=========================================================================
cat /proc/interrupts
              CPU0
 53:       4534                XXXXX  serial
 56:         12                   XXXXX  phy_interrupt
153:   20262068          XXXXX  timer
ERR:          0
=========================================================================

So in first iteration, interrupt is cleared, and in second, function will execute:

          } else if (end == NULL)
                        end = l;

which will terminate the loop, but the return code will be IRQ_RETVAL(0).




On Fri 19/08/11 12:01 , Jiri Slaby <jslaby@suse.cz> wrote:

> On 08/19/2011 07:44 PM, Ivica Mikec wrote:
> > 
> > Hi!
> > 
> > 
> > I noticed a problem in 8250.c. 
> > 
> > My board has only one UART port, and is 16550 compatible, so in function
> serial8250_interrupt I see that serial_in function is called twice. Second
> time, code "else if (end == NULL)" is executed and function return
> IRQ_NONE. This causes an entry in /proc/irq/spurious:
> > 
> > count 239
> > unhandled 1
> > last_unhandled 4294700846 ms
> > 
> > But this is not a spurious interrupt.
> 
> How did you find out? Have you checked that the port signals that it
> raised an interrupt? I.e. does it go through the 'if (!(iir &
> UART_IIR_NO_INT))' branch?
> 
> What other devices are bound to the same interrupt? Attach
> /proc/interrupts.
> 
> regards,
> -- 
> js
> suse labs
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Possible bug in 8250.c
@ 2011-08-19 17:44 Ivica Mikec
  2011-08-19 19:01 ` Jiri Slaby
  0 siblings, 1 reply; 4+ messages in thread
From: Ivica Mikec @ 2011-08-19 17:44 UTC (permalink / raw)
  To: linux-kernel


 Hi!


I noticed a problem in 8250.c. 

My board has only one UART port, and is 16550 compatible, so in function serial8250_interrupt I see that serial_in function is called twice. Second time, code "else if (end == NULL)" is executed and function return IRQ_NONE. This causes an entry in /proc/irq/spurious:

count 239
unhandled 1
last_unhandled 4294700846 ms

But this is not a spurious interrupt.

Regards.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-20 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-20  0:58 Possible bug in 8250.c Ivica Mikec
2011-08-20 16:21 ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2011-08-19 17:44 Ivica Mikec
2011-08-19 19:01 ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox