Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751754AbbF2JhK (ORCPT ); Mon, 29 Jun 2015 05:37:10 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41131 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbbF2JhH (ORCPT ); Mon, 29 Jun 2015 05:37:07 -0400 Date: Mon, 29 Jun 2015 11:37:03 +0200 From: Joerg Roedel To: Heiko =?iso-8859-1?Q?St=FCbner?= Cc: Joerg Roedel , djkurtz@chromium.org, Tomasz Figa , iommu@lists.linux-foundation.org, Will Deacon , Kukjin Kim , David Woodhouse , Hiroshi Doyu , Thierry Reding , Alex Williamson , Robin Murphy , Laurent Pinchart , Oded Gabbay , linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/22] iommu: Propagate error in add_iommu_group 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7180470.n5cCZefX9d@diego> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1292 Lines: 29 Hello Heiko, On Mon, Jun 29, 2015 at 11:28:40AM +0200, Heiko St?bner 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 breakage > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/