From: "Remy Bohmer" <linux@bohmer.net>
To: "Haavard Skinnemoen" <hskinnemoen@atmel.com>
Cc: "Andrew Victor" <linux@maxim.org.za>,
RT <linux-rt-users@vger.kernel.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"ARM Linux Mailing List"
<linux-arm-kernel@lists.arm.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: Atmel Serial Console interrupt handler splitup
Date: Tue, 18 Dec 2007 08:32:57 +0100 [thread overview]
Message-ID: <3efb10970712172332o32b6dab5l33ecac57d18f49d4@mail.gmail.com> (raw)
In-Reply-To: <20071218001240.5cb42aae@siona>
Hello Haavard,
> > Yep. All calls that block on a Mutex somehow on Preempt-RT. (such as
> > spinlocks, wakeup_interruptible() and many of its friends.)
> Right. Looks like the DMA patch call these functions from irq context
> too...I guess it'll need the same treatment?
That is correct. DMA code does do that, but the DMA code is not used
for DBGU, and _only_ the interrupt handler of DBGU runs in
IRQF_NODELAY context (because it is part of the System-IRQ and thus
shared with the timer-irq). The DMA code always runs in IRQ-thread
context, where it is safe to block on a mutex.
So, it is not mandatory to change that also. (It may be nice to do it anyway)
> > > > +struct atmel_uart_char {
> > > > + unsigned int status;
> > > > + unsigned int overrun;
> > > > + unsigned int ch;
> > > > + unsigned int flg;
> > > > +};
> > >
> > > Hmm. 16 bytes per char is a bit excessive, isn't it? How about
> > >
> > > struct atmel_uart_char {
> > > u16 ch;
> > > u16 status;
> > > };
> > >
> > > where ch is the received character (up to 9 bits) and status is the
> > > lowest 16 bits of the status register?
> > I used the NODELAY patch for the 8250 serial port as reference, it
> > contains similar code, and I tried to make both look the same.
> Ok, I see. But...
> > > > +#define ATMEL_SERIAL_RINGSIZE 1024
> This means that the buffer ends up at 16K. Since the buffer itself is
> kept in a struct along with a few other pieces of data, we end up
> kmalloc()ing 32KB of memory...
Oops... 32kB on X86 is not much, relatively, on ARM it is somewhat different.
We can also decrease the total RingSize, 128 would be good enough also.
I can look at it later this week.
> I'm a bit tempted to just go ahead and do the changes we agree on and
> post the result. Then I'll see if I can make the DMA stuff behave. I've
> got a different driver lying around which is DMA-only and has a few
> problems on its own.
Beware that, according to several older discussions, DBGU cannot make
use of DMA... (If I understood it correctly, it was because the buffer
first have to be full, before an interupt is generated. That would be
very annoying while typing 1 character at the time ;-)
> Also, I think the DMA patch needs to be more integrated with your
> "interrupt handler splitup" patch. No point in keeping two RX buffers
> around, and the DMA code needs to obey the same rules as the rest of
> the driver if it's going to work in -rt.
As mentioned, not necessarily...
> And I'd really like to have working DMA support on avr32 before
> christmas ;-)
Me too ;-)
Kind Regards,
Remy
next prev parent reply other threads:[~2007-12-18 7:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 15:24 [PATCH]: Atmel Serial Console interrupt handler splitup Remy Bohmer
2007-12-07 18:31 ` David Brownell
2007-12-07 19:57 ` Andrew Victor
2007-12-07 20:38 ` Remy Bohmer
2007-12-07 21:16 ` Remy Bohmer
2007-12-12 21:10 ` Steven Rostedt
2007-12-12 22:29 ` Remy Bohmer
2007-12-13 16:40 ` Remy Bohmer
2007-12-13 17:33 ` Andrew Victor
2007-12-13 20:32 ` Remy Bohmer
2007-12-13 20:35 ` Remy Bohmer
2007-12-14 11:46 ` Remy Bohmer
2007-12-17 12:17 ` Haavard Skinnemoen
2007-12-17 18:13 ` Haavard Skinnemoen
2007-12-17 20:56 ` Remy Bohmer
2007-12-17 23:12 ` Haavard Skinnemoen
2007-12-18 7:32 ` Remy Bohmer [this message]
2007-12-17 23:49 ` Russell King - ARM Linux
2007-12-18 9:07 ` Haavard Skinnemoen
[not found] <AANLkTi=TyvXEtoZGatP5pxymLSna9g6ULV46i72bYgc4@mail.gmail.com>
2010-10-29 13:52 ` Remy Bohmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3efb10970712172332o32b6dab5l33ecac57d18f49d4@mail.gmail.com \
--to=linux@bohmer.net \
--cc=hskinnemoen@atmel.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux@maxim.org.za \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).