[ofa-general] mlx4: device driver tries to sync DMA memory it has not allocated

Roland Dreier rdreier at cisco.com
Mon Aug 10 13:32:32 PDT 2009


 > Has anyone ever encountered a message like the one below ? This message was
 > generated while booting a 2.6.30.4 kernel with CONFIG_DMA_API_DEBUG=y and
 > before any out-of-tree kernel modules were loaded.
 > 
 > ------------[ cut here ]------------
 > WARNING: at lib/dma-debug.c:635 check_sync+0x47c/0x4b0()
 > Hardware name: P5Q DELUXE
 > mlx4_core 0000:01:00.0: DMA-API: device driver tries to sync DMA memory it
 > has not allocated [device address=0x0000000139482000] [size=4096 bytes]
 > Modules linked in: snd_hda_codec_atihdmi snd_hda_codec_analog snd_hda_intel
 > snd_hda_codec snd_hwdep snd_pcm snd_timer snd rtc_cmos soundcore i2c_i801
 > rtc_core hid_belkin mlx4_core(
 > +) rtc_lib sr_mod sg snd_page_alloc pcspkr button intel_agp i2c_core joydev
 > serio_raw cdrom usbhid hid raid456 raid6_pq async_xor async_memcpy async_tx
 > xor raid0 sd_mod crc_t10dif
 > ehci_hcd uhci_hcd usbcore edd raid1 ext3 mbcache jbd fan ide_pci_generic
 > ide_core ata_generic ata_piix pata_marvell ahci libata scsi_mod thermal
 > processor thermal_sys hwmon
 > Pid: 1325, comm: work_for_cpu Not tainted 2.6.30.4-scst-debug #6
 > Call Trace:
 >  [<ffffffff8039bc7c>] ? check_sync+0x47c/0x4b0
 >  [<ffffffff80248b48>] warn_slowpath_common+0x78/0xd0
 >  [<ffffffff80248bfc>] warn_slowpath_fmt+0x3c/0x40
 >  [<ffffffff80517769>] ? _spin_lock_irqsave+0x49/0x60
 >  [<ffffffff8039b8ab>] ? check_sync+0xab/0x4b0
 >  [<ffffffff8039bc7c>] check_sync+0x47c/0x4b0
 >  [<ffffffff802724ac>] ? mark_held_locks+0x6c/0x90
 >  [<ffffffff8039be1d>] debug_dma_sync_single_for_cpu+0x1d/0x20
 >  [<ffffffffa024a969>] mlx4_write_mtt+0x159/0x1e0 [mlx4_core]

I think the problem is that there really isn't any way truly supported
by the DMA API to do a partial sync on something we mapped with
"map_sg".  I guess we really should just give up on virtual mapping etc
and use dma_map_single to map the ICM memory; I doubt it has any
measurable downside, even on platforms where dma_sync_single is a NOP.

 - R.



More information about the general mailing list