From: Gururaja Hebbar <gururaja.hebbar@ti.com>
To: Daniel Mack <zonque@gmail.com>, Joel Fernandes <joelf@ti.com>
Cc: balajitk@ti.com, nsekhar@ti.com, s.neumann@raumfeld.com,
Russ.Dill@ti.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4] ARM: omap: edma: add suspend suspend/resume hooks
Date: Fri, 8 Nov 2013 09:37:09 +0530 [thread overview]
Message-ID: <527C636D.4040007@ti.com> (raw)
In-Reply-To: <527BCFD8.9010207@gmail.com>
On Thursday 07 November 2013 11:07 PM, Daniel Mack wrote:
> Hi Joel,
>
> On 11/07/2013 05:34 PM, Joel Fernandes wrote:
>> Thanks for your followup patch on this. It looks much better now using existing
>> functions to save/restore the state.
>
> Yes, thanks for the suggesting it in the first place.
>
>> On 10/30/2013 03:21 PM, Daniel Mack wrote:
>>> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
>> [..]
>>> +static int edma_pm_resume(struct device *dev)
>>> +{
>>> + int i, j;
>>> +
>>> + pm_runtime_get_sync(dev);
>>> +
>>> + for (j = 0; j < arch_num_cc; j++) {
>>> + struct edma *cc = edma_cc[j];
>>> +
>>> + s8 (*queue_priority_mapping)[2];
>>> + s8 (*queue_tc_mapping)[2];
>>> +
>>> + queue_tc_mapping = cc->info->queue_tc_mapping;
>>> + queue_priority_mapping = cc->info->queue_priority_mapping;
>>> +
>>> + /* Event queue to TC mapping */
>>> + for (i = 0; queue_tc_mapping[i][0] != -1; i++)
>>> + map_queue_tc(j, queue_tc_mapping[i][0],
>>> + queue_tc_mapping[i][1]);
>>> +
>>> + /* Event queue priority mapping */
>>> + for (i = 0; queue_priority_mapping[i][0] != -1; i++)
>>> + assign_priority_to_queue(j,
>>> + queue_priority_mapping[i][0],
>>> + queue_priority_mapping[i][1]);
>>
>> I know ti,edma-regions property is not currently being used, but we should
>> future proof this by setting up DRAE for like done in probe:
>>
>> for (i = 0; i < info[j]->n_region; i++) {
>> edma_write_array2(j, EDMA_DRAE, i, 0, 0x0);
>> edma_write_array2(j, EDMA_DRAE, i, 1, 0x0);
>> edma_write_array(j, EDMA_QRAE, i, 0x0);
>> }
>
> That doesn't work for me. I'm running long-time tests here on a device
> which has a mwifiex connected to omap_hsmmc. The test procedure includes:
>
> a) a script on the device that puts the device to sleep some seconds
> after it has been woken up
>
> b) a script on a host that wakes up the device with wake-on-lan every 10
> seconds
>
> c) a flood ping that checks whether the device is responding
can you share above 2 (b & C) test scripts? (pastebin or inline if small)
thanks in advance
regards
Gururaja
>
>
> That precedure is running since a couple of hourse here, and it works
> well with both by v3 and v4 patches. Moving the functions to
> .suspend/resume _noirq doesn't seem to break anything.
>
> Setting QRAE to 0 as you mentioned above, however, makes the device fail
> at resume.
>
>>> +static SIMPLE_DEV_PM_OPS(edma_pm_ops, edma_pm_suspend, edma_pm_resume);
>>
>> I agree with Nishanth here, it is better to do this in .suspend/resume _noirq
>> stage to rule out any ordering bugs that may show up in the future, since such
>> an issue already showed up in earlier testing.
>
> Alright, I already did that.
>
>> I would appreciate it if you can make these 2 changes and post a v5. Thanks for
>> a lot for all the hardwork.
>
> No problem at all :)
>
>> Acked-by: Joel Fernandes <joelf@ti.com>
>
> Still sure about that? What about your follow-up to your own reply?
>
>
> Many thanks for all the feedback!
>
> Daniel
>
>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: gururaja.hebbar@ti.com (Gururaja Hebbar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] ARM: omap: edma: add suspend suspend/resume hooks
Date: Fri, 8 Nov 2013 09:37:09 +0530 [thread overview]
Message-ID: <527C636D.4040007@ti.com> (raw)
In-Reply-To: <527BCFD8.9010207@gmail.com>
On Thursday 07 November 2013 11:07 PM, Daniel Mack wrote:
> Hi Joel,
>
> On 11/07/2013 05:34 PM, Joel Fernandes wrote:
>> Thanks for your followup patch on this. It looks much better now using existing
>> functions to save/restore the state.
>
> Yes, thanks for the suggesting it in the first place.
>
>> On 10/30/2013 03:21 PM, Daniel Mack wrote:
>>> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
>> [..]
>>> +static int edma_pm_resume(struct device *dev)
>>> +{
>>> + int i, j;
>>> +
>>> + pm_runtime_get_sync(dev);
>>> +
>>> + for (j = 0; j < arch_num_cc; j++) {
>>> + struct edma *cc = edma_cc[j];
>>> +
>>> + s8 (*queue_priority_mapping)[2];
>>> + s8 (*queue_tc_mapping)[2];
>>> +
>>> + queue_tc_mapping = cc->info->queue_tc_mapping;
>>> + queue_priority_mapping = cc->info->queue_priority_mapping;
>>> +
>>> + /* Event queue to TC mapping */
>>> + for (i = 0; queue_tc_mapping[i][0] != -1; i++)
>>> + map_queue_tc(j, queue_tc_mapping[i][0],
>>> + queue_tc_mapping[i][1]);
>>> +
>>> + /* Event queue priority mapping */
>>> + for (i = 0; queue_priority_mapping[i][0] != -1; i++)
>>> + assign_priority_to_queue(j,
>>> + queue_priority_mapping[i][0],
>>> + queue_priority_mapping[i][1]);
>>
>> I know ti,edma-regions property is not currently being used, but we should
>> future proof this by setting up DRAE for like done in probe:
>>
>> for (i = 0; i < info[j]->n_region; i++) {
>> edma_write_array2(j, EDMA_DRAE, i, 0, 0x0);
>> edma_write_array2(j, EDMA_DRAE, i, 1, 0x0);
>> edma_write_array(j, EDMA_QRAE, i, 0x0);
>> }
>
> That doesn't work for me. I'm running long-time tests here on a device
> which has a mwifiex connected to omap_hsmmc. The test procedure includes:
>
> a) a script on the device that puts the device to sleep some seconds
> after it has been woken up
>
> b) a script on a host that wakes up the device with wake-on-lan every 10
> seconds
>
> c) a flood ping that checks whether the device is responding
can you share above 2 (b & C) test scripts? (pastebin or inline if small)
thanks in advance
regards
Gururaja
>
>
> That precedure is running since a couple of hourse here, and it works
> well with both by v3 and v4 patches. Moving the functions to
> .suspend/resume _noirq doesn't seem to break anything.
>
> Setting QRAE to 0 as you mentioned above, however, makes the device fail
> at resume.
>
>>> +static SIMPLE_DEV_PM_OPS(edma_pm_ops, edma_pm_suspend, edma_pm_resume);
>>
>> I agree with Nishanth here, it is better to do this in .suspend/resume _noirq
>> stage to rule out any ordering bugs that may show up in the future, since such
>> an issue already showed up in earlier testing.
>
> Alright, I already did that.
>
>> I would appreciate it if you can make these 2 changes and post a v5. Thanks for
>> a lot for all the hardwork.
>
> No problem at all :)
>
>> Acked-by: Joel Fernandes <joelf@ti.com>
>
> Still sure about that? What about your follow-up to your own reply?
>
>
> Many thanks for all the feedback!
>
> Daniel
>
>
>
>
next prev parent reply other threads:[~2013-11-08 4:07 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 20:21 [PATCH v4] ARM: omap: edma: add suspend suspend/resume hooks Daniel Mack
2013-10-30 20:21 ` Daniel Mack
2013-10-31 22:25 ` Vaibhav Bedia
2013-10-31 22:25 ` Vaibhav Bedia
2013-11-06 17:36 ` Joel Fernandes
2013-11-06 17:36 ` Joel Fernandes
2013-11-07 13:30 ` Gururaja Hebbar
2013-11-07 13:30 ` Gururaja Hebbar
2013-11-07 13:32 ` Daniel Mack
2013-11-07 13:32 ` Daniel Mack
2013-11-07 15:18 ` Nishanth Menon
2013-11-07 15:18 ` Nishanth Menon
2013-11-07 15:36 ` Daniel Mack
2013-11-07 15:36 ` Daniel Mack
2013-11-07 15:48 ` Nishanth Menon
2013-11-07 15:48 ` Nishanth Menon
2013-11-07 20:42 ` Vaibhav Bedia
2013-11-07 20:42 ` Vaibhav Bedia
2013-11-15 14:39 ` Nishanth Menon
2013-11-15 14:39 ` Nishanth Menon
2013-11-17 22:09 ` Daniel Mack
2013-11-17 22:09 ` Daniel Mack
2013-11-07 20:34 ` Vaibhav Bedia
2013-11-07 20:34 ` Vaibhav Bedia
2013-11-07 15:34 ` Nishanth Menon
2013-11-07 15:34 ` Nishanth Menon
2013-11-07 16:27 ` Grygorii Strashko
2013-11-07 16:27 ` Grygorii Strashko
2013-11-07 20:46 ` Vaibhav Bedia
2013-11-07 20:46 ` Vaibhav Bedia
2013-11-07 16:34 ` Joel Fernandes
2013-11-07 16:34 ` Joel Fernandes
2013-11-07 16:49 ` Joel Fernandes
2013-11-07 16:49 ` Joel Fernandes
2013-11-07 17:37 ` Daniel Mack
2013-11-07 17:37 ` Daniel Mack
2013-11-07 21:39 ` Joel Fernandes
2013-11-07 21:39 ` Joel Fernandes
2013-11-08 4:07 ` Gururaja Hebbar [this message]
2013-11-08 4:07 ` Gururaja Hebbar
2013-11-08 7:51 ` Daniel Mack
2013-11-08 7:51 ` Daniel Mack
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=527C636D.4040007@ti.com \
--to=gururaja.hebbar@ti.com \
--cc=Russ.Dill@ti.com \
--cc=balajitk@ti.com \
--cc=joelf@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=s.neumann@raumfeld.com \
--cc=zonque@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.