From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Chanho Min <chanho.min@lge.com>, Alan Cox <alan@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Pawel Moll <pawel.moll@arm.com>,
chanho0207@gmail.com
Subject: Re: [PATCH] ARM: PL011: Add support for Rx DMA buffer polling
Date: Mon, 14 Jan 2013 00:26:08 +0000 [thread overview]
Message-ID: <20130114002608.GV23505@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CACRpkdaJd48WOzP_iURATb=c+V6==2-AB2Y9oFyh=E3oe1eT0Q@mail.gmail.com>
On Mon, Jan 14, 2013 at 01:04:58AM +0100, Linus Walleij wrote:
> At some point we reasoned that we may actually be saved
> by the reverse phenomena - if single request is *NOT*
> connected, there will very often be some characters in the
> FIFO, and that's enough to trigger the RTIM IRQ, and we get
> a nice flow. So maybe the platforms that actually work, work
> because they have bursts only.
>
> But that would pose a problem when an even burst of
> characters arrive. Say 16 characters, this will be transferred
> in two bursts and leave the FIFO empty, but no DMA TC
> IRQ since the buffer is not full, and we'd get your
> phenomena.
>
> But I could never reproduce the latter theoretical problem,
> so I think the hardware actually has a fix for this, around
> the burst signal logic.
>
> But it may very well be that the single request can not be
> enabled for the PL011 for it to work properly.
What you describe above is exactly the problem I see on the Versatile
platform with it's PL080 and PL011. I made the comment that this setup
can't work properly as it stands. And I don't think that setting a
timer which fires every jiffy count is really a solution to the problem.
That's an expensive way of having a per-jiffy callback for something
that's probably going to remain idle most of the time.
Not only that, but a 1 jiffy timeout even for slower baud rates is
just utterly silly.
The point of using DMA is to move the workload off the CPU onto hardware,
so that the CPU can go off and do other stuff. If it's having to poll
it once every jiffy, then...
> You may not be able to turn this off, and in that case this
> kind of code is the only way forward indeed.
Unless there's something inbetween the PL080 and PL011 to do that.
The peripherals themselves don't have any means of controlling this.
The solution I came up with on Versatile was to just not enable
receive DMA - at all.
next prev parent reply other threads:[~2013-01-14 0:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50efad8d.84fc440a.589e.ffff9546SMTPIN_ADDED_BROKEN@mx.google.com>
2013-01-11 18:34 ` Linus Walleij
[not found] ` <50f107aa.894e420a.596a.ffffe3f6SMTPIN_ADDED_BROKEN@mx.google.com>
2013-01-14 0:04 ` Linus Walleij
2013-01-14 0:26 ` Russell King - ARM Linux [this message]
2013-01-14 6:46 ` Linus Walleij
2013-01-14 7:27 ` Chanho Min
2013-01-14 7:56 ` Linus Walleij
2013-01-14 8:41 ` Chanho Min
2013-01-22 12:45 ` [PATCH v2] " Chanho Min
2013-01-22 13:18 ` Linus Walleij
2013-01-23 5:07 ` Chanho Min
2013-01-25 20:25 ` Greg Kroah-Hartman
2013-01-25 21:26 ` Russell King - ARM Linux
2013-03-27 9:38 [PATCH] " Chanho Min
2013-03-29 16:19 ` Greg Kroah-Hartman
[not found] <006c01cdefc2$c7e1cb90$57a562b0$@min@lge.com>
2013-01-11 16:18 ` Russell King - ARM Linux
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=20130114002608.GV23505@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=alan@linux.intel.com \
--cc=chanho.min@lge.com \
--cc=chanho0207@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pawel.moll@arm.com \
/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
all inboxes | Powered by JetHome®