Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbeAQLgI (ORCPT + 1 other); Wed, 17 Jan 2018 06:36:08 -0500 Received: from foss.arm.com ([217.140.101.70]:38786 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752306AbeAQLgH (ORCPT ); Wed, 17 Jan 2018 06:36:07 -0500 Subject: Re: [PATCH v2 05/13] iommu/rockchip: Fix error handling in init To: Tomasz Figa , Jeffy Chen Cc: linux-kernel@vger.kernel.org, Ricky Liang , simon xue , Heiko Stuebner , "open list:ARM/Rockchip SoC..." , "open list:IOMMU DRIVERS" , Joerg Roedel , linux-arm-kernel@lists.infradead.org References: <20180116132540.18939-1-jeffy.chen@rock-chips.com> <20180116132540.18939-6-jeffy.chen@rock-chips.com> From: Robin Murphy Message-ID: Date: Wed, 17 Jan 2018 11:36:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 17/01/18 05:26, Tomasz Figa wrote: > On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote: >> It's hard to undo bus_set_iommu() in the error path, so move it to the >> end of rk_iommu_probe(). > > Does this work fine now? I remember we used to need this called in an > early initcall for all the ARM/ARM64 DMA stuff to work. It will do once we get to patch #11 (where the IOMMU_OF_DECLARE ensures that masters defer until iommu_register() has set ops with a non-NULL .of_xlate callback); in the meantime you might end up depending on DT probe order as to whether the master uses the IOMMU or not. I'd say it's up to you guys whether you consider that a bisection-breaker or not. Robin.