Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp772794ybb; Wed, 8 Apr 2020 09:35:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKjom4gRpV0Z9NyYbBQBlYgZ39uf8y6GvGp0T0+tWLF/bp7EXml384FYJ7pqbyy5cHFTEow X-Received: by 2002:a9d:62c2:: with SMTP id z2mr6731670otk.155.1586363731435; Wed, 08 Apr 2020 09:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586363731; cv=none; d=google.com; s=arc-20160816; b=sU8Wp9rG+mE0M4O9fublBPjSQgqd1KPABDqBbXuiXrnMCC4Smbev9NBwCWLpMgIMnd gKX/jml4LqEgB4CeM+NqMU3iGZyc0j+fFmbtjDUaE7qMgn37ubfzQGwh74189XHewqVZ 9rGZNQTcO5yTFDnNI9b6/uge9SY7tJwkIco1IxU8XU66rjqBdpU9IbvgA4eHfUJ9N/6R MS43TEA4Wn8T4Mfm2q50JDmrFtmn04wita9MrHMaAn6xIDqkBS79F6CI3Qa6FK5J69G7 x+c8eQgztWzaUy5h1x25OEJ/1o+51WEm1bc+SLMVm8O+Z0VDXA9Km//EhGbEGAz3UWhY R7Vw== 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=CpHOvZc8j7ALUUy7EIvQsHFDL+DrCcCzdh5SxFDwIPI=; b=d0LlyRhrQQ6e/FU2lN6XcPsVpLEdSnZtkA8pKjs/TOVOSv9pBCVRratRQC9IdlcAiI em/z7T3hRMk8GvYq4jDfS45Y4a+9tY3K7EPZ4QwFMnJSzjQelbgxu09Twu9goffW553Q W66Lpn8ojowp2Y21Pw1ze0XwAErUQbgHV9hKyHZ7m4XUnzUcrskXFJnzbA5XFg+FzCjv zDV5vA9mCHSJCSX1jOjf3vwRXTA3S194kRgyvewaug0fqe0CbW7NExJDq0+wybHLsx1s Nu7NBEnVjsldKLyQW49Me/0b6uUdSQ+G1pwPLl1BdCMFDhMANUojUZwGHhBSDh5RIwFq IBAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id e22si2748272otp.138.2020.04.08.09.35.14; Wed, 08 Apr 2020 09:35:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729225AbgDHPAS (ORCPT + 99 others); Wed, 8 Apr 2020 11:00:18 -0400 Received: from 8bytes.org ([81.169.241.247]:58646 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727929AbgDHPAS (ORCPT ); Wed, 8 Apr 2020 11:00:18 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 7190D387; Wed, 8 Apr 2020 17:00:16 +0200 (CEST) Date: Wed, 8 Apr 2020 17:00:15 +0200 From: Joerg Roedel To: Marek Szyprowski Cc: Will Deacon , Robin Murphy , Kukjin Kim , Krzysztof Kozlowski , David Woodhouse , Lu Baolu , Andy Gross , Bjorn Andersson , Matthias Brugger , Rob Clark , Heiko Stuebner , Gerald Schaefer , Thierry Reding , Jonathan Hunter , Jean-Philippe Brucker , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, virtualization@lists.linux-foundation.org, Joerg Roedel Subject: Re: [RFC PATCH 31/34] iommu/exynos: Create iommu_device in struct exynos_iommu_owner Message-ID: <20200408150014.GM3103@8bytes.org> References: <20200407183742.4344-1-joro@8bytes.org> <20200407183742.4344-32-joro@8bytes.org> <449e7f16-e719-9617-ec92-63b82c0bc33f@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Marek, On Wed, Apr 08, 2020 at 04:23:05PM +0200, Marek Szyprowski wrote: > I need a place to initialize properly all the structures for the given > master (IOMMU client device, the one which performs DMA operations). That could be in the probe_device() call-back, no? > I tried to move all the initialization from xlate() to device_probe(), > but such approach doesn't work. device_probe() is exynos_sysmmu_probe(), then yes, this is called before any of the xlate() calls are made. Would it work to keep the iommu_device structures in the sysmmus and also create them for the owners? This isn't really a nice solution but should work the the IOMMU driver until there is a better way to fix this. Regards, Joerg