From: viresh.kumar@st.com (viresh kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 2/7] dmaengine/dw_dmac: Replace spin_lock* with irqsave variants
Date: Fri, 29 Apr 2011 15:47:19 +0530 [thread overview]
Message-ID: <4DBA902F.2080009@st.com> (raw)
In-Reply-To: <20110429091557.GZ17290@n2100.arm.linux.org.uk>
On 04/29/2011 02:45 PM, Russell King - ARM Linux wrote:
> BTW, how this gets handled in other drivers is basically as follows in
> the tasklet:
>
> tasklet()
> {
> LIST_HEAD(completed);
>
> spin_lock_irqsave(lock, flags);
> for each txd(txd) {
> if (completed(txd))
> list_move_tail(&txd->node, &completed);
> }
> try to start new txd();
> spin_unlock_irqrestore(lock, flags);
>
> for each list entry safe(txd, &completed) {
> void (*callback)(void *) = txd->callback;
> void *param = txd->callback_param;
>
> free_txd(txd);
>
> if (callback)
> callback(param);
> }
> }
>
> I'm not sure how easy it is to move dw_dmac to that kind of structure,
I will check that.
--
viresh
WARNING: multiple messages have this Message-ID (diff)
From: viresh kumar <viresh.kumar@st.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Shiraz HASHIM <shiraz.hashim@st.com>,
"vinod.koul@intel.com" <vinod.koul@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Armando VISCONTI <armando.visconti@st.com>,
"viresh.linux@gmail.com" <viresh.linux@gmail.com>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V3 2/7] dmaengine/dw_dmac: Replace spin_lock* with irqsave variants
Date: Fri, 29 Apr 2011 15:47:19 +0530 [thread overview]
Message-ID: <4DBA902F.2080009@st.com> (raw)
In-Reply-To: <20110429091557.GZ17290@n2100.arm.linux.org.uk>
On 04/29/2011 02:45 PM, Russell King - ARM Linux wrote:
> BTW, how this gets handled in other drivers is basically as follows in
> the tasklet:
>
> tasklet()
> {
> LIST_HEAD(completed);
>
> spin_lock_irqsave(lock, flags);
> for each txd(txd) {
> if (completed(txd))
> list_move_tail(&txd->node, &completed);
> }
> try to start new txd();
> spin_unlock_irqrestore(lock, flags);
>
> for each list entry safe(txd, &completed) {
> void (*callback)(void *) = txd->callback;
> void *param = txd->callback_param;
>
> free_txd(txd);
>
> if (callback)
> callback(param);
> }
> }
>
> I'm not sure how easy it is to move dw_dmac to that kind of structure,
I will check that.
--
viresh
next prev parent reply other threads:[~2011-04-29 10:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 9:36 [PATCH V3 0/7] dmaengine/dw_dmac updates Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-27 9:36 ` [PATCH V3 1/7] dmaengine/dw_dmac: call dwc_descriptor_complete from dwc_control with lock held Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-27 9:36 ` [PATCH V3 2/7] dmaengine/dw_dmac: Replace spin_lock* with irqsave variants Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-28 17:10 ` Russell King - ARM Linux
2011-04-28 17:10 ` Russell King - ARM Linux
2011-04-29 9:15 ` Russell King - ARM Linux
2011-04-29 9:15 ` Russell King - ARM Linux
2011-04-29 10:17 ` viresh kumar [this message]
2011-04-29 10:17 ` viresh kumar
2011-04-29 10:18 ` viresh kumar
2011-04-29 10:18 ` viresh kumar
2011-04-27 9:36 ` [PATCH V3 3/7] dmaengine/dw_dmac: don't call callback routine in case dmaengine_terminate_all() is called Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-28 17:11 ` Russell King - ARM Linux
2011-04-28 17:11 ` Russell King - ARM Linux
2011-04-29 3:25 ` viresh kumar
2011-04-29 3:25 ` viresh kumar
2011-04-27 9:36 ` [PATCH V3 4/7] dmaengine/dw_dmac: Enable resubmission from callback routine Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-28 17:12 ` Russell King - ARM Linux
2011-04-28 17:12 ` Russell King - ARM Linux
2011-04-27 9:36 ` [PATCH V3 5/7] dmaengine/dw_dmac: set residue as total len in dwc_tx_status if status is !DMA_SUCCESS Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-27 9:36 ` [PATCH V3 6/7] dmaengine/dw_dmac: Divide one sg to many desc, if sg len is greater than DWC_MAX_COUNT Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-27 9:36 ` [PATCH V3 7/7] dmaengine/dw_dmac: implement pause and resume in dwc_control Viresh Kumar
2011-04-27 9:36 ` Viresh Kumar
2011-04-27 9:40 ` [PATCH V3 0/7] dmaengine/dw_dmac updates viresh kumar
2011-04-27 9:40 ` viresh kumar
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=4DBA902F.2080009@st.com \
--to=viresh.kumar@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.