From: Dan Williams <dan.j.williams@intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d()
Date: Mon, 19 Jan 2009 15:04:40 -0700 [thread overview]
Message-ID: <1232402680.22432.5.camel@dwillia2-linux.ch.intel.com> (raw)
In-Reply-To: <20090119213106.GA9648@elte.hu>
On Mon, 2009-01-19 at 14:31 -0700, Ingo Molnar wrote:
> FYI, i'm getting this on a testbox, on v2.6.29-rc2:
Thanks for the report. I assume this is with CONFIG_DMA_ENGINE=n?
dma_issue_pending_all should be a nop in that case. I'll apply the
following with your confirmation.
Regards,
Dan
---
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 6df144a..9c53e5e 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -330,7 +330,7 @@ struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type)
int cpu;
WARN_ONCE(dmaengine_ref_count == 0,
- "client called %s without a reference", __func__);
+ "client called %s without a reference\n", __func__);
cpu = get_cpu();
chan = per_cpu_ptr(channel_table[tx_type], cpu)->chan;
@@ -349,7 +349,7 @@ void dma_issue_pending_all(void)
struct dma_chan *chan;
WARN_ONCE(dmaengine_ref_count == 0,
- "client called %s without a reference", __func__);
+ "client called %s without a reference\n", __func__);
rcu_read_lock();
list_for_each_entry_rcu(device, &dma_device_list, global_node) {
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 64dea2a..c4a560e 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -390,11 +390,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
#ifdef CONFIG_DMA_ENGINE
enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
+void dma_issue_pending_all(void);
#else
static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
{
return DMA_SUCCESS;
}
+static inline void dma_issue_pending_all(void)
+{
+ do { } while (0);
+}
#endif
/* --- DMA device --- */
@@ -403,7 +408,6 @@ int dma_async_device_register(struct dma_device *device);
void dma_async_device_unregister(struct dma_device *device);
void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
-void dma_issue_pending_all(void);
#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
void dma_release_channel(struct dma_chan *chan);
next prev parent reply other threads:[~2009-01-19 22:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 21:31 Ingo Molnar
2009-01-19 22:04 ` Dan Williams [this message]
2009-01-19 22:18 ` Dan Williams
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=1232402680.22432.5.camel@dwillia2-linux.ch.intel.com \
--to=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome