On Wed, 2017-08-30 at 13:56 -0700, Dave Jiang wrote: : +static int pmem_attach_disk(struct device *dev, > + struct nd_namespace_common *ndns) > +{ > + struct pmem_device *pmem; > + int rc; > + struct dma_chan *chan = NULL; > + int has_dma; > + > + pmem = pmem_core_setup_pmem(dev, ndns); > + if (!pmem) > + return -ENXIO; > + > + chan = dma_find_channel(DMA_MEMCPY_SG); > + if (!chan) > + dev_warn(dev, "Forced back to CPU, no DMA\n"); I just tested this series on a Haswell system. The above warning messages was shown during boot-up (is this expected?), but it did not appear to switch back to CPU. Initial IO requests to pmem (mkfs) hit the WARN_ON_ONCE() below. pmem->sg_allocated is zero since it was not initialized (has_dma was set to 0). [ 897.147527] WARNING: CPU: 23 PID: 707 at drivers/nvdimm/pmem_dma.c:171 pmem_handle_cmd_dma+0x675/0x710 It then displayed seemed-forever-repeated error messages below. ioatdma 0000:80:04.7: ioat_timer_event: Channel halted (1) ioatdma 0000:80:04.7: Errors: ioatdma 0000:80:04.7: Err(0): DMA Transfer Source Address Error ioatdma 0000:80:04.7: Reset channel... ioatdma 0000:80:04.7: Restart channel... ioatdma 0000:80:04.7: ioat_timer_event: Channel halted (1000) ioatdma 0000:80:04.7: Errors: ioatdma 0000:80:04.7: Err(12): Completion Address Error ioatdma 0000:80:04.7: Reset channel... ioatdma 0000:80:04.7: Restart channel... ioatdma 0000:80:04.7: ioat_timer_event: Channel halted (1000) : Any thoughts? Also, how do I choose the mode between CPU and DMA? Thanks! -Toshi ��.n��������+%������w��{.n��������)�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥