Re: [PATCH 09/14] tty/serial/amba-pl011: Implement clear_irqs callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 10, 2012 at 12:17:02PM +0100, Alan Cox wrote:
[...]
> > +static void pl011_clear_irqs(struct uart_port *port)
> > +{
> > +	struct uart_amba_port *uap = (struct uart_amba_port *)port;
> > +	unsigned char __iomem *regs = uap->port.membase;
> > +
> > +	writew(readw(regs + UART011_MIS), regs + UART011_ICR);
> > +	/*
> > +	 * There is no way to clear TXIM, this is "ready to transmit IRQ", so
> > +	 * we simply mask it. ops->start_tx will unmask it.
> > +	 */
> 
> Not if you race here with the transmit start it won't.

True, the race is possible. But I guess there will be no harm: only non-polling
code uses ->start_tx(), but then we don't care, the port is used for NMI
debugger, so the worst that can happen, is that we'll get another NMI just
after the race, and so we'll mask it again.

And once we release the port from KDB, we never call this function anymore
(since normal IRQ routine will be called instead).

I guess I need to add some commens about this.

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux