Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Jassi Brar
On Fri, Oct 16, 2020 at 1:54 PM Jerome Brunet wrote: > > > On Fri 16 Oct 2020 at 19:33, Jassi Brar wrote: > > > On Fri, Oct 16, 2020 at 4:00 AM Jerome Brunet wrote: > >> > >> > >> On Fri 16 Oct 2020 at 10:52, Ionela Voinescu > >> wrote: > >> > >> > On Thursday 15 Oct 2020 at 13:45:54 (-0500),

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Jerome Brunet
On Fri 16 Oct 2020 at 19:33, Jassi Brar wrote: > On Fri, Oct 16, 2020 at 4:00 AM Jerome Brunet wrote: >> >> >> On Fri 16 Oct 2020 at 10:52, Ionela Voinescu wrote: >> >> > On Thursday 15 Oct 2020 at 13:45:54 (-0500), Jassi Brar wrote: >> > [..] >> >> > >> --- a/drivers/mailbox/mailbox.c >> >>

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Jassi Brar
On Fri, Oct 16, 2020 at 4:00 AM Jerome Brunet wrote: > > > On Fri 16 Oct 2020 at 10:52, Ionela Voinescu wrote: > > > On Thursday 15 Oct 2020 at 13:45:54 (-0500), Jassi Brar wrote: > > [..] > >> > >> --- a/drivers/mailbox/mailbox.c > >> > >> +++ b/drivers/mailbox/mailbox.c > >> > >> @@ -82,9

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Sudeep Holla
On Fri, Oct 16, 2020 at 1:15 PM Jerome Brunet wrote: > > > On Fri 16 Oct 2020 at 10:52, Ionela Voinescu wrote: > > > On Thursday 15 Oct 2020 at 13:45:54 (-0500), Jassi Brar wrote: > > [..] > >> > >> --- a/drivers/mailbox/mailbox.c > >> > >> +++ b/drivers/mailbox/mailbox.c > >> > >> @@ -82,9

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Sudeep Holla
On Fri, Oct 16, 2020 at 12:32 PM Ionela Voinescu wrote: > > On Thursday 15 Oct 2020 at 13:45:54 (-0500), Jassi Brar wrote: > [..] > > > >> --- a/drivers/mailbox/mailbox.c > > > >> +++ b/drivers/mailbox/mailbox.c > > > >> @@ -82,9 +82,13 @@ static void msg_submit(struct mbox_chan *chan) > > > >>

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Sudeep Holla
On Fri, Oct 16, 2020 at 10:34:21AM +0100, Sudeep Holla wrote: > On Fri, Oct 16, 2020 at 11:02:02AM +0200, Jerome Brunet wrote: > > > > On Fri 16 Oct 2020 at 10:44, Sudeep Holla wrote: > > > > > On Thu, Oct 15, 2020 at 03:29:35PM +0100, Ionela Voinescu wrote: > > >> Hi Jerome, > > >> > > >> On

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Sudeep Holla
On Fri, Oct 16, 2020 at 11:02:02AM +0200, Jerome Brunet wrote: > > On Fri 16 Oct 2020 at 10:44, Sudeep Holla wrote: > > > On Thu, Oct 15, 2020 at 03:29:35PM +0100, Ionela Voinescu wrote: > >> Hi Jerome, > >> > >> On Thursday 15 Oct 2020 at 15:58:30 (+0200), Jerome Brunet wrote: > >> > > >> >

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Jerome Brunet
On Fri 16 Oct 2020 at 10:44, Sudeep Holla wrote: > On Thu, Oct 15, 2020 at 03:29:35PM +0100, Ionela Voinescu wrote: >> Hi Jerome, >> >> On Thursday 15 Oct 2020 at 15:58:30 (+0200), Jerome Brunet wrote: >> > >> > On Thu 15 Oct 2020 at 15:46, Ionela Voinescu >> > wrote: >> > >> > > Hi guys,

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Jerome Brunet
On Fri 16 Oct 2020 at 10:52, Ionela Voinescu wrote: > On Thursday 15 Oct 2020 at 13:45:54 (-0500), Jassi Brar wrote: > [..] >> > >> --- a/drivers/mailbox/mailbox.c >> > >> +++ b/drivers/mailbox/mailbox.c >> > >> @@ -82,9 +82,13 @@ static void msg_submit(struct mbox_chan *chan) >> > >> exit:

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Ionela Voinescu
On Thursday 15 Oct 2020 at 13:45:54 (-0500), Jassi Brar wrote: [..] > > >> --- a/drivers/mailbox/mailbox.c > > >> +++ b/drivers/mailbox/mailbox.c > > >> @@ -82,9 +82,13 @@ static void msg_submit(struct mbox_chan *chan) > > >> exit: > > >> spin_unlock_irqrestore(>lock, flags); > > >> > > >> -

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-16 Thread Sudeep Holla
On Thu, Oct 15, 2020 at 03:29:35PM +0100, Ionela Voinescu wrote: > Hi Jerome, > > On Thursday 15 Oct 2020 at 15:58:30 (+0200), Jerome Brunet wrote: > > > > On Thu 15 Oct 2020 at 15:46, Ionela Voinescu > > wrote: > > > > > Hi guys, > > > > > > On Wednesday 23 Sep 2020 at 14:39:16 (+0200),

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-15 Thread Jassi Brar
On Thu, Oct 15, 2020 at 8:58 AM Jerome Brunet wrote: > > > On Thu 15 Oct 2020 at 15:46, Ionela Voinescu wrote: > > > Hi guys, > > > > On Wednesday 23 Sep 2020 at 14:39:16 (+0200), Jerome Brunet wrote: > >> If the txdone is done by polling, it is possible for msg_submit() to start > >> the timer

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-15 Thread Ionela Voinescu
Hi Jerome, On Thursday 15 Oct 2020 at 15:58:30 (+0200), Jerome Brunet wrote: > > On Thu 15 Oct 2020 at 15:46, Ionela Voinescu wrote: > > > Hi guys, > > > > On Wednesday 23 Sep 2020 at 14:39:16 (+0200), Jerome Brunet wrote: > >> If the txdone is done by polling, it is possible for msg_submit()

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-15 Thread Jerome Brunet
On Thu 15 Oct 2020 at 15:46, Ionela Voinescu wrote: > Hi guys, > > On Wednesday 23 Sep 2020 at 14:39:16 (+0200), Jerome Brunet wrote: >> If the txdone is done by polling, it is possible for msg_submit() to start >> the timer while txdone_hrtimer() callback is running. If the timer needs >>

Re: [PATCH] mailbox: cancel timer before starting it

2020-10-15 Thread Ionela Voinescu
Hi guys, On Wednesday 23 Sep 2020 at 14:39:16 (+0200), Jerome Brunet wrote: > If the txdone is done by polling, it is possible for msg_submit() to start > the timer while txdone_hrtimer() callback is running. If the timer needs > recheduling, it could already be enqueued by the time

Re: [PATCH] mailbox: cancel timer before starting it

2020-09-24 Thread Kevin Hilman
Jerome Brunet writes: > If the txdone is done by polling, it is possible for msg_submit() to start > the timer while txdone_hrtimer() callback is running. If the timer needs > recheduling, it could already be enqueued by the time hrtimer_forward_now() > is called, leading hrtimer to loudly

[PATCH] mailbox: cancel timer before starting it

2020-09-23 Thread Jerome Brunet
If the txdone is done by polling, it is possible for msg_submit() to start the timer while txdone_hrtimer() callback is running. If the timer needs recheduling, it could already be enqueued by the time hrtimer_forward_now() is called, leading hrtimer to loudly complain. WARNING: CPU: 3 PID: 74 at