From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4A11C2BB86 for ; Thu, 9 Apr 2020 14:31:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 967DB21556 for ; Thu, 9 Apr 2020 14:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727327AbgDIObC (ORCPT ); Thu, 9 Apr 2020 10:31:02 -0400 Received: from 8bytes.org ([81.169.241.247]:58886 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbgDIObC (ORCPT ); Thu, 9 Apr 2020 10:31:02 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 40578391; Thu, 9 Apr 2020 16:31:01 +0200 (CEST) Date: Thu, 9 Apr 2020 16:30:59 +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: [PATCH] iommu/exynos: Get rid of 'struct exynos_iommu_owner' exynos_iommu_owner Message-ID: <20200409143059.GP3103@8bytes.org> References: <20200407183742.4344-1-joro@8bytes.org> <20200407183742.4344-32-joro@8bytes.org> <449e7f16-e719-9617-ec92-63b82c0bc33f@samsung.com> <20200409114620.GA16298@8bytes.org> <40af831b-d00c-0cf9-0a06-e60c048a9ab8@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40af831b-d00c-0cf9-0a06-e60c048a9ab8@samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi Marek, On Thu, Apr 09, 2020 at 03:58:00PM +0200, Marek Szyprowski wrote: > The main problem after your conversion is the fact that ->probe_device() > is called very early, before any other platform device (thus IOMMU > controller) is is probed. It doesn't handle EPROBE_DEFER too. I don't quite understand why probe_device() is called too early, as it is called at the same time add_device() was called before. But anyway, I have seen a similar problem on OMAP. If the SYSMMU for a master is not probed yet when probe_device() is called, it can just return -ENODEV and in your driver you just call but_iommu_probe() when a new SYSMMU got initialized to re-probe uninitialized masters on the bus. This patch-set contains a change to export bus_iommu_probe() for exactly that reason. What do you think? Regards, Joerg