From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [RFC PATCH 31/34] iommu/exynos: Create iommu_device in struct exynos_iommu_owner Date: Wed, 8 Apr 2020 17:00:15 +0200 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 Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 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-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-rockchi List-Id: virtualization@lists.linuxfoundation.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