WARNING: at drivers/dma/dmaengine.c:352 dma_issue_pending_all+0x77/0x15d()
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
Quoted 1 line · Ingo Molnar
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
---
drivers/dma/dmaengine.c +2 -2
@@ -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) {
include/linux/dmaengine.h +5 -1
@@ -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);
Quoted 7 lines · Dan Williams
Quoted 1 line · Ingo Molnar
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_allshould 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