Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp379538ybk; Fri, 15 May 2020 03:11:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyghO7QY6jqmctia93tDPr3RHlPtu6xKMp40t+jTsB7xtrXBt4EdqtMofbBcoP38K/bC646 X-Received: by 2002:a17:907:4096:: with SMTP id nm6mr1895920ejb.30.1589537516374; Fri, 15 May 2020 03:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589537516; cv=none; d=google.com; s=arc-20160816; b=k7jzFUkLH+5QzW1/ZPZycowDtz8Q0NLsnXuF5G1uC0y5eMTzd4O671H1Hz+bfOZfQ9 YuWsCKm51SK6TwlBsljid0EOksUln7YDosvSsHnoJAIrU08Ka1zEzqZ+kxmWcL0sGeh4 dFMP/NYmtt9ZK7x9H8SVhXKNW9BA40bfO4EhGkTSosfK1uhubYZNlMpcAY/fK1ayXJ2A O7h4lPqjt9P15Wgdk8bNQGi+eQ6U72PX409cblezHvT7F+qbEqJYTUghT0O1hCv7/8cb /ItbnFbBGokBxeGQmSRuOq/lS61eFoimxaJ4pYUJC8Vn5KJXZZwl5FSXTzDxLcuvBFRH V5yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hjn/rOJsiv2cwYleswNpvvG3QJmP3RuFd/mKuc+aniI=; b=IpgaqFlkG16RyzgKof9ua7tOlseY3BSfH0ud1ojarD+AnkanPbb4+dmwSF8X4cXUwG DLSCQqt6tlYK61H2VVoKKCPzJtIoZUBsWBC4Q6VRN3Dg0FcyJfszE/dgYSslxJBGMp9b ipojNtq6k64LZlU9Z8g7Pco0i0OXPmBzNSLbec7KOZuB/L77BpZvTMEgGHbvUv6s2sFG Y/lr1I2sAQcV4oj3JDVcmG7MFEX4EXfDuvrMRFLHIXVCzdLu0TRleqizGZb59qdJHAJB Z47vdE3wAf4LbdBNLxQ0Z0ChA+n1hKxFOZbJSRMcqwjlbKNQnfsQ/+VUUgEtA00c0M8E b9+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r28si929195edl.121.2020.05.15.03.11.31; Fri, 15 May 2020 03:11:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728279AbgEOKHV (ORCPT + 99 others); Fri, 15 May 2020 06:07:21 -0400 Received: from 8bytes.org ([81.169.241.247]:43136 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728007AbgEOKHV (ORCPT ); Fri, 15 May 2020 06:07:21 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 27896379; Fri, 15 May 2020 12:07:20 +0200 (CEST) Date: Fri, 15 May 2020 12:07:18 +0200 From: Joerg Roedel To: Yong Wu Cc: Will Deacon , Robin Murphy , Marek Szyprowski , Matthias Brugger , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Joerg Roedel , linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2 23/33] iommu/mediatek-v1 Convert to probe/release_device() call-backs Message-ID: <20200515100718.GS18353@8bytes.org> References: <20200414131542.25608-1-joro@8bytes.org> <20200414131542.25608-24-joro@8bytes.org> <1589528699.26119.9.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1589528699.26119.9.camel@mhfsdcap03> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, May 15, 2020 at 03:44:59PM +0800, Yong Wu wrote: > On Tue, 2020-04-14 at 15:15 +0200, Joerg Roedel wrote: > > - return iommu_device_link(&data->iommu, dev); > > + err = arm_iommu_attach_device(dev, mtk_mapping); > > + if (err) > > + dev_err(dev, "Can't create IOMMU mapping - DMA-OPS will not work\n"); > > > Hi Joerg, > > Thanks very much for this patch. > > This arm_iommu_attach_device is called just as we expected. > > But it will fail in this callstack as the group->mutex was tried to > be re-locked... > > [] (iommu_attach_device) from [] > (__arm_iommu_attach_device+0x34/0x90) > [] (__arm_iommu_attach_device) from [] > (arm_iommu_attach_device+0xc/0x20) > [] (arm_iommu_attach_device) from [] > (mtk_iommu_probe_finalize+0x34/0x50) > [] (mtk_iommu_probe_finalize) from [] > (bus_iommu_probe+0x2a8/0x2c4) > [] (bus_iommu_probe) from [] (bus_set_iommu > +0x88/0xd4) > [] (bus_set_iommu) from [] (mtk_iommu_probe > +0x2f8/0x364) Thanks for the report, is https://lore.kernel.org/lkml/1589530123-30240-1-git-send-email-yong.wu@mediatek.com/ The fix for this issue or is something else required? Thanks, Joerg