lkml.org 
[lkml]   [2014]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] mailbox: Don't unnecessarily re-arm the polling timer
On Thu, Oct 30, 2014 at 01:01:07PM -0700, Andrew Bresticker wrote:
> poll_txdone() will unconditionally re-arm the polling timer if there was
> an active request, even if the active request completed and no other
> requests were submitted. This is fixed by:
> - only re-arming the timer if the controller reported that the current
> transmission has not completed, and,
> - moving the call to poll_txdone() into msg_submit() so that the
> controller gets polled (and the timer re-armed, if necessary) whenever
> a new message is submitted.
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> ---
> drivers/mailbox/mailbox.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
> index 5008028..26f74ad 100644
> --- a/drivers/mailbox/mailbox.c
> +++ b/drivers/mailbox/mailbox.c
> @@ -28,6 +28,8 @@
> static LIST_HEAD(mbox_cons);
> static DEFINE_MUTEX(con_mutex);
>
> +static void poll_txdone(unsigned long data);

I think I'd rather move poll_txdone() here to avoid the forward
declaration, but either way:

Reviewed-by: Thierry Reding <treding@nvidia.com>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-10-31 13:21    [W:0.438 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site