[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbuiHmZP7HKuoaw1O0xyZJEDv6ja1Q=YqOtBViRYBufZQ@mail.gmail.com>
Date: Tue, 26 Jun 2012 02:56:17 +0800
From: Linus Walleij <linus.walleij@...aro.org>
To: Doug Anderson <dianders@...omium.org>
Cc: Olof Johansson <olof@...om.net>, Bryan Freed <bfreed@...omium.org>,
spi-devel-general@...ts.sourceforge.net, grant.likely@...retlab.ca,
linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: [PATCH] spi: Unlock a spinlock before calling into the controller driver.
On Tue, Jun 26, 2012 at 1:07 AM, Doug Anderson <dianders@...omium.org> wrote:
> Specifically there should be only one instance of spi_pump_messages()
> running at a time per master. That's because it's a kthread work
> function. ...so we can't possibly get a prepare in the middle of the
> unprepare when prepare is called because the only caller to
> prepare/unprepare is spi_pump_messages().
Yes that's how the message pump is designed.
> I can't comment on whether it's better to do something like add a
> workqueue (which might be more obvious / less fragile) or just to add
> a comment. I will let others comment on that. :)
The message pump initially used a workqueue, but was converted
to a kthread because we needed to push the queue to run as
realtime for some important low-latency workloads across
SPI. The code is basically a tweaked workqueue if you dive down
in the implementation.
Yours,
Linus Walleij
--
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