From: akpm@linux-foundation.org Subject: [merged] drivers-dma-ioat-dmac-check-dma-mapping-error-in-ioat_dma_self_test.patch removed from -mm tree Date: Fri, 03 Jan 2014 12:38:08 -0800 Message-ID: <52c71fb0.3gaZEuRY5u5YMK44%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50595 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754116AbaACUiI (ORCPT ); Fri, 3 Jan 2014 15:38:08 -0500 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, vinod.koul@intel.com, kyungmin.park@samsung.com, dan.j.williams@intel.com, b.zolnierkie@samsung.com, jiang.liu@linux.intel.com Subject: [merged] drivers-dma-ioat-dmac-check-dma-mapping-error-in-ioat_dma_self_test.patch removed from -mm tree To: jiang.liu@linux.intel.com,b.zolnierkie@samsung.com,dan.j.williams@intel.com,kyungmin.park@samsung.com,vinod.koul@intel.com,mm-commits@vger.kernel.org From: akpm@linux-foundation.org Date: Fri, 03 Jan 2014 12:38:08 -0800 The patch titled Subject: drivers/dma/ioat/dma.c: check DMA mapping error in ioat_dma_self_test() has been removed from the -mm tree. Its filename was drivers-dma-ioat-dmac-check-dma-mapping-error-in-ioat_dma_self_test.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Jiang Liu Subject: drivers/dma/ioat/dma.c: check DMA mapping error in ioat_dma_self_test() Check DMA mapping return values in function ioat_dma_self_test() to get rid of following warning message. [ 20.582159] ------------[ cut here ]------------ [ 20.582170] WARNING: CPU: 0 PID: 1203 at lib/dma-debug.c:937 check_unmap+0x4cc 0/0x9a0() [ 20.582197] ioatdma 0000:00:04.0: DMA-API: device driver failed to check map error[device address=0x000000085191b000] [size=2000 bytes] [mapped as single] [ 20.582202] Modules linked in: ioatdma(+) mac_hid wmi acpi_pad lp parport hidd _generic usbhid hid ixgbe isci dca libsas ahci ptp libahci scsi_transport_sas mee garaid_sas pps_core mdio [ 20.582313] CPU: 0 PID: 1203 Comm: systemd-udevd Not tainted 3.13.0-rc4+ #8 [ 20.582320] Hardware name: Intel Corporation BRICKLAND/BRICKLAND, BIOS BRIVTII N1.86B.0044.L09.1311181644 11/18/2013 [ 20.582324] 0000000000000009 ffff8810432fb818 ffffffff8185ddb1 ffff8810432fbb 860 [ 20.582361] ffff8810432fb850 ffffffff81073b1d ffff881037831c80 ffff880850f8ff 310 [ 20.582382] ffffffff82a89710 0000000000000292 ffffffff81cc7b85 ffff8810432fbb 8b0 [ 20.582390] Call Trace: [ 20.582402] [] dump_stack+0x4d/0x66 [ 20.582413] [] warn_slowpath_common+0x7d/0xa0 [ 20.582418] [] warn_slowpath_fmt+0x4c/0x50 [ 20.582449] [] ? driver_filter+0x2a/0xe0 [ 20.582454] [] check_unmap+0x4c0/0x9a0 [ 20.582458] [] debug_dma_unmap_page+0x81/0x90 [ 20.582466] [] ioat_dma_self_test+0x3d2/0x680 [ioatdma] [ 20.582476] [] ioat3_dma_self_test+0x12/0x30 [ioatdma] [ 20.582490] [] ioat_probe+0xf4/0x110 [ioatdma] [ 20.582500] [] ioat3_dma_probe+0x268/0x410 [ioatdma] [ 20.582505] [] ioat_pci_probe+0x122/0x1b0 [ioatdma] [ 20.582516] [] local_pci_probe+0x45/0xa0 [ 20.582522] [] ? pci_match_device+0xc5/0xd0 [ 20.582530] [] pci_device_probe+0xd9/0x130 [ 20.582537] [] driver_probe_device+0x171/0x490 [ 20.582566] [] __driver_attach+0x93/0xa0 [ 20.582577] [] ? __device_attach+0x40/0x40 [ 20.582583] [] bus_for_each_dev+0x6b/0xb0 [ 20.582587] [] driver_attach+0x1e/0x20 [ 20.582593] [] bus_add_driver+0x1f8/0x2b0 [ 20.582604] [] ? 0xffffffffa0119fff [ 20.582614] [] driver_register+0x81/0x110 [ 20.582627] [] __pci_register_driver+0x60/0x70 [ 20.582637] [] ioat_init_module+0x89/0x1000 [ioatdma] [ 20.582655] [] do_one_initcall+0xe2/0x250 [ 20.582661] [] ? 0xffffffffa0119fff [ 20.582668] [] ? set_memory_nx+0x43/0x50 [ 20.582675] [] load_module+0x2313/0x2a00 [ 20.582690] [] ? store_uevent+0x40/0x40 [ 20.582696] [] SyS_init_module+0xd9/0x130 [ 20.582702] [] system_call_fastpath+0x1a/0x1f [ 20.582704] ---[ end trace 990c591681d27c31 ]--- [ 20.582706] Mapped at: [ 20.582708] [] debug_dma_map_page+0xbe/0x180 [ 20.582712] [] ioat_dma_self_test+0x1ab/0x680 [ioatdma] [ 20.582716] [] ioat3_dma_self_test+0x12/0x30 [ioatdma] [ 20.582720] [] ioat_probe+0xf4/0x110 [ioatdma] [ 20.582725] [] ioat3_dma_probe+0x268/0x410 [ioatdma] Signed-off-by: Jiang Liu Cc: Vinod Koul Cc: Dan Williams Cc: Bartlomiej Zolnierkiewicz Cc: Kyungmin Park Signed-off-by: Andrew Morton --- drivers/dma/ioat/dma.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff -puN drivers/dma/ioat/dma.c~drivers-dma-ioat-dmac-check-dma-mapping-error-in-ioat_dma_self_test drivers/dma/ioat/dma.c --- a/drivers/dma/ioat/dma.c~drivers-dma-ioat-dmac-check-dma-mapping-error-in-ioat_dma_self_test +++ a/drivers/dma/ioat/dma.c @@ -817,7 +817,15 @@ int ioat_dma_self_test(struct ioatdma_de } dma_src = dma_map_single(dev, src, IOAT_TEST_SIZE, DMA_TO_DEVICE); + if (dma_mapping_error(dev, dma_src)) { + dev_err(dev, "mapping src buffer failed\n"); + goto free_resources; + } dma_dest = dma_map_single(dev, dest, IOAT_TEST_SIZE, DMA_FROM_DEVICE); + if (dma_mapping_error(dev, dma_dest)) { + dev_err(dev, "mapping dest buffer failed\n"); + goto unmap_src; + } flags = DMA_PREP_INTERRUPT; tx = device->common.device_prep_dma_memcpy(dma_chan, dma_dest, dma_src, IOAT_TEST_SIZE, flags); @@ -855,8 +863,9 @@ int ioat_dma_self_test(struct ioatdma_de } unmap_dma: - dma_unmap_single(dev, dma_src, IOAT_TEST_SIZE, DMA_TO_DEVICE); dma_unmap_single(dev, dma_dest, IOAT_TEST_SIZE, DMA_FROM_DEVICE); +unmap_src: + dma_unmap_single(dev, dma_src, IOAT_TEST_SIZE, DMA_TO_DEVICE); free_resources: dma->device_free_chan_resources(dma_chan); out: _ Patches currently in -mm which might be from jiang.liu@linux.intel.com are origin.patch