From: Linus Walleij <linus.walleij@linaro.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
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 07:46:45 +0100 [thread overview]
Message-ID: <CACRpkdbVPeva08nL_FP7qw0MeKLz6h40kPHAz_W95ZBGraOnpg@mail.gmail.com> (raw)
In-Reply-To: <20130114002608.GV23505@n2100.arm.linux.org.uk>
On Mon, Jan 14, 2013 at 1:26 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> [Me]
>> 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.
OK then that's what we can expect from an unmodified PL011.
> 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...
Agreed.
Chanho, have you considered just leaving RX DMA undefined
and only use DMA for TX?
I know sometimes a programmer will get assigned to "implement
DMA for IP block <foo>", and usually they want to deliver, but
sometimes you have to come back and say "you know that
is not such a good idea".
>> 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.
We have it working perfectly on U300 and Ux500 but I think
it must be thanks to some hardware modifications.
On the Ux500 it is strictly required since it is used for megabit
rate chips like Bluetooth, and we get successful DMA support
on these.
> The solution I came up with on Versatile was to just not enable
> receive DMA - at all.
Then I suspect I can reproduce it with the PB11MPCore
and PL081 also given some time. I probably just did the tests
the wrong way.
Yours,
Linus Walleij
next prev parent reply other threads:[~2013-01-14 6:46 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 ` [PATCH] ARM: PL011: Add support for Rx DMA buffer polling 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
2013-01-14 6:46 ` Linus Walleij [this message]
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=CACRpkdbVPeva08nL_FP7qw0MeKLz6h40kPHAz_W95ZBGraOnpg@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=alan@linux.intel.com \
--cc=chanho.min@lge.com \
--cc=chanho0207@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).