From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752208AbcEIJfj (ORCPT ); Mon, 9 May 2016 05:35:39 -0400 Received: from foss.arm.com ([217.140.101.70]:36458 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbcEIJfh (ORCPT ); Mon, 9 May 2016 05:35:37 -0400 Date: Mon, 9 May 2016 10:35:41 +0100 From: Will Deacon To: Niklas =?iso-8859-1?Q?S=F6derlund?= Cc: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, joro@8bytes.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, robin.murphy@arm.com Subject: Re: [PATCH 2/2] iommu/io-pgtable-arm: use __dma_sync_single_for_device() Message-ID: <20160509093540.GF19763@arm.com> References: <1462705196-10857-1-git-send-email-niklas.soderlund+renesas@ragnatech.se> <1462705196-10857-3-git-send-email-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1462705196-10857-3-git-send-email-niklas.soderlund+renesas@ragnatech.se> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 08, 2016 at 12:59:56PM +0200, Niklas Söderlund wrote: > The call to dma_sync_single_for_device() can be reached from > dma_map_single(). If CONFIG_DMA_API_DEBUG is enabled this would result > in a check that the mapping being synced is valid. Since the call to > dma_map_single is not yet completed the mapping is not recorded in > dma-debug and the check fails and a warning is printed. Avoid this > warning by calling __dma_sync_single_for_device() which don't preform > this check. Hmm, I don't understand why this would trigger that warning. The memory being sync'd here is the page table memory, not the buffer being mapped. The page table memory is "mapped" using dma_map_single in __arm_lpae_alloc_pages, so it sounds like the issue something else. Will