* WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d()
@ 2009-01-19 21:31 Ingo Molnar
2009-01-19 22:04 ` Dan Williams
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2009-01-19 21:31 UTC (permalink / raw)
To: linux-kernel, Dan Williams; +Cc: Rafael J. Wysocki
FYI, i'm getting this on a testbox, on v2.6.29-rc2:
[ 78.930438] ------------[ cut here ]------------
[ 78.932162] ADDRCONF(NETDEV_UP): eth2: link is not ready
[ 78.940748] WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d()
[ 78.948876] Hardware name: P4DC6
[ 78.952232] client called dma_issue_pending_all without a referencePid: 0, comm: swapper Not tainted 2.6.29-rc2-tip #1
[ 78.963176] Call Trace:
[ 78.965747] [<c0177cc9>] warn_slowpath+0x90/0xa6
[ 78.970578] [<c01a7266>] ? __lock_acquire+0x6f2/0x748
[ 78.975835] [<c01a56a9>] ? mark_held_locks+0x45/0x5c
[ 78.981012] [<c0d35100>] ? napi_complete+0x7a/0x97
[ 78.986016] [<c01a587b>] ? trace_hardirqs_on_caller+0x112/0x167
[ 78.992139] [<c01a58db>] ? trace_hardirqs_on+0xb/0xd
[ 78.997311] [<c075e8d4>] ? e1000_clean+0x5a6/0x5f2
[ 79.002306] [<c0d06b34>] dma_issue_pending_all+0x77/0x15d
[ 79.007912] [<c0d358ea>] net_rx_action+0x2cc/0x2e6
[ 79.012911] [<c017f69a>] __do_softirq+0xbb/0x1cf
[ 79.017738] [<c017f5df>] ? __do_softirq+0x0/0x1cf
[ 79.022644] <IRQ> [<c01cadc5>] ? handle_fasteoi_irq+0x0/0x124
[ 79.028778] [<c017f585>] ? irq_exit+0x50/0xaa
[ 79.033340] [<c012aade>] ? do_IRQ+0x119/0x12f
[ 79.037901] [<c0127d8c>] ? common_interrupt+0x2c/0x34
[ 79.043163] [<c01a00d8>] ? tick_broadcast_oneshot_control+0x10c/0x42e
[ 79.049807] [<c0152398>] ? native_safe_halt+0xa/0xc
[ 79.054896] [<c012f7c1>] ? default_idle+0xbf/0xd2
[ 79.059806] [<c0125765>] ? cpu_idle+0x16a/0x1a4
[ 79.064564] [<c0f4f41f>] ? rest_init+0x53/0x55
[ 79.069210] ---[ end trace 230444e9b1c5e1e1 ]---
[ 79.074319] e1000: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[ 79.083245] ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
the driver that just ran was e1000.
Btw., this format string:
WARN_ONCE(dmaengine_ref_count == 0,
"client called %s without a reference", __func__);
is missing a \n.
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d()
2009-01-19 21:31 WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d() Ingo Molnar
@ 2009-01-19 22:04 ` Dan Williams
2009-01-19 22:18 ` Dan Williams
0 siblings, 1 reply; 3+ messages in thread
From: Dan Williams @ 2009-01-19 22:04 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel@vger.kernel.org, Rafael J. Wysocki
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d()
2009-01-19 22:04 ` Dan Williams
@ 2009-01-19 22:18 ` Dan Williams
0 siblings, 0 replies; 3+ messages in thread
From: Dan Williams @ 2009-01-19 22:18 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel@vger.kernel.org, Rafael J. Wysocki
On Mon, 2009-01-19 at 15:04 -0700, Dan Williams wrote:
> 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.
>
Spoke too soon, the call to dma_issue_pending_all is protected by ifdef
CONFIG_NET_DMA. Reading that counter without synchronizing with
dma_list_mutex is a problem. I think I'll just remove the warnings for
now.
--
Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-19 22:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 21:31 WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d() Ingo Molnar
2009-01-19 22:04 ` Dan Williams
2009-01-19 22:18 ` Dan Williams
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.