[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080130113434.2519f77c@dhcp-252-066.norway.atmel.com>
Date:	Wed, 30 Jan 2008 11:34:34 +0100
From:	Haavard Skinnemoen <hskinnemoen@...el.com>
To:	"Remy Bohmer" <linux@...mer.net>
Cc:	michael <trimarchi@...dalf.sssup.it>, fabio@...dalf.sssup.it,
	"Andrew Victor" <linux@...im.org.za>,
	"Chip Coldwell" <coldwell@...hat.com>,
	"Marc Pignat" <marc.pignat@...s.ch>,
	"David Brownell" <david-b@...bell.net>,
	linux-kernel@...r.kernel.org, "Alan Cox" <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH -mm v4 6/9] atmel_serial: Split the interrupt handler
On Wed, 30 Jan 2008 11:21:49 +0100
"Remy Bohmer" <linux@...mer.net> wrote:
> > >  * Drop the lock here since it might end up calling
> > >  * uart_start(), which takes the lock.
> > >    spin_unlock(&port->lock);
> > >  */
> > >     tty_flip_buffer_push(port->info->tty);
> > > /*
> > >     spin_lock(&port->lock);
> > >  */
> > > The same code with this comments out runs  
> 
> I expect the UART generating the problem is the DBGU port. The DBGU
> shares its interrupt line with the timer interrupt with the IRQF_TIMER
> flag set, and thus the DBGU interrupt handler is running in
> IRQF_NODELAY context. Within this context it is forbidden to lock a
> normal spinlock, because a normal spinlock is converted to a mutex on
> Preempt-RT; a mutex can sleep which is forbidden in interrupt context.
> So, to get around this problem, this lock spinlock has to be of the
> raw_spinlock_t type. The raw_spinlock_t is the normal mainline-kernel
> spinlock, and as such it is not converted to a mutex, and will
> therefor never sleep.
> 
> Attached a patch that changes this spinlock type. I used it in my
> patchset, but your updates of December last year do not need this
> patch anymore, so apparantly you changed something that has a
> regression on Preempt-RT...
The code above is from the tasklet, so I don't think that's the problem.
The interrupt handler doesn't take any locks.
Or are spinlocks not allowed in softirq context either?
> I believe I have to look at the latest set of patches, and try to find
> any regressions. Do you have a location somewhere where I can download
> the latest versions? Or do I need to dig through LKML to find the
> latest... ;-)
They are in -mm. You were Cc'ed I think...
Haavard
Haavard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
