From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbdEGAHB (ORCPT ); Sat, 6 May 2017 20:07:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34066 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbdEGAGy (ORCPT ); Sat, 6 May 2017 20:06:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 80C9B80F63 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=jonmasters.org Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=jcm@jonmasters.org DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 80C9B80F63 Subject: Re: [PATCH 0/2] Fix incorrect warning from dma-debug To: Robin Murphy , =?UTF-8?Q?Niklas_S=c3=b6derlund?= , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org References: <1462705196-10857-1-git-send-email-niklas.soderlund+renesas@ragnatech.se> <57305A4B.70401@arm.com> <57305FD8.7070006@arm.com> Cc: linux-renesas-soc@vger.kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org Newsgroups: gmane.linux.kernel.renesas-soc,gmane.linux.ports.arm.kernel,gmane.linux.kernel.iommu,gmane.linux.kernel From: Jon Masters Organization: World Organi{s,z}ation of Broken Dreams Message-ID: <477ded30-eef2-3598-3a8d-95d206e11efb@jonmasters.org> Date: Sat, 6 May 2017 20:06:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <57305FD8.7070006@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sun, 07 May 2017 00:06:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/2016 06:00 AM, Robin Murphy wrote: > On 09/05/16 10:37, Robin Murphy wrote: >> Hi Niklas, >> >> On 08/05/16 11:59, Niklas Söderlund wrote: >>> Hi, >>> >>> While using CONFIG_DMA_API_DEBUG i came across this warning which I >>> think is a false positive. As shown dma_sync_single_for_device() are >>> called from the dma_map_single() call path. This triggers the warning >>> since the dma-debug code have not yet been made aware of the mapping. >> >> Almost right ;) The thing being mapped (the SPI device's buffer) and the >> thing being synced (the IOMMU's PTE) are entirely unrelated. Due to the >> current of_iommu_init() setup, the IOMMU is probed long before >> dma_debug_init() gets called, therefore DMA debug is missing entries for >> some of the initial page table mappings and gets confused when we update >> them later. What was the eventual followup/fix for this? We're seeing similar traces to this during internal testing of 4.11 kernels. Jon. -- Computer Architect