From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 03/22] iommu: Propagate error in add_iommu_group Date: Mon, 29 Jun 2015 11:37:03 +0200 Message-ID: <20150629093703.GA16648@suse.de> References: <1432831305-11126-1-git-send-email-joro@8bytes.org> <1432831305-11126-4-git-send-email-joro@8bytes.org> <7180470.n5cCZefX9d@diego> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <7180470.n5cCZefX9d@diego> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Heiko =?iso-8859-1?Q?St=FCbner?= Cc: Will Deacon , djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, Tomasz Figa , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Kukjin Kim , Thierry Reding , Laurent Pinchart , David Woodhouse , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: iommu@lists.linux-foundation.org Hello Heiko, On Mon, Jun 29, 2015 at 11:28:40AM +0200, Heiko St=FCbner wrote: > The Rockchip iommu uses bus_set_ops to set its iommu-ops for the platform > bus and currently returns -ENODEV if it encounters a platform_devices that > does not have an iommu. As add_iommu_group ignored these returns > till now this worked, but of course starts to fail now. > = > All two invocations of the add_device callback ignored (or still ignore) = the > return value so I've come with the following small patch to fix the break= age > that now exists in the 4.2 tree. > = > There is probably a better solution possible in the longer term, likely > similar to what Samsung does, but I'm not sure yet how this would work > with our drm device that needs an iommu mapping without having an > iommu (the iommus being attached to the crtc-components). Yes, this issue was already reported from the Exynos side. I have a fix which just ignores -ENODEV as the return value for now. This fixes Exynos, and should fix Rockchip (and some other IOMMU drivers) too. Joerg