Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933675AbeAKLPD (ORCPT + 1 other); Thu, 11 Jan 2018 06:15:03 -0500 Received: from regular1.263xmail.com ([211.150.99.133]:38105 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932456AbeAKLPA (ORCPT ); Thu, 11 Jan 2018 06:15:00 -0500 X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: m.szyprowski@samsung.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <1416ebc8e998d3e88225e4c5506c4ec7> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <5A57471E.7020304@rock-chips.com> Date: Thu, 11 Jan 2018 19:14:38 +0800 From: JeffyChen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130126 Thunderbird/19.0 MIME-Version: 1.0 To: Marek Szyprowski , linux-kernel@vger.kernel.org CC: jcliang@chromium.org, robin.murphy@arm.com, tfiga@chromium.org, linux-samsung-soc@vger.kernel.org, Kukjin Kim , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux-foundation.org, Frank Rowand , Krzysztof Kozlowski , Rob Clark , Will Deacon , Joerg Roedel , Rob Herring , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/9] iommu/of: Drop early initialisation hooks References: <20180111082229.24011-1-jeffy.chen@rock-chips.com> <20180111082229.24011-2-jeffy.chen@rock-chips.com> <60fdd375-ca74-0fea-c598-39a68b9e7735@samsung.com> In-Reply-To: <60fdd375-ca74-0fea-c598-39a68b9e7735@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Marek, Thanks for your reply. On 01/11/2018 05:40 PM, Marek Szyprowski wrote: > Hi Jeffy, > > On 2018-01-11 09:22, Jeffy Chen wrote: >> With the probe-deferral mechanism, early initialisation hooks are no >> longer needed. >> >> Suggested-by: Robin Murphy >> Signed-off-by: Jeffy Chen >> --- >> >> drivers/iommu/arm-smmu-v3.c | 2 +- >> drivers/iommu/arm-smmu.c | 12 ++++++------ >> drivers/iommu/exynos-iommu.c | 2 +- > > For Exynos IOMMU: > Acked-by: Marek Szyprowski > > IPMMU and MSM IOMMU are no longer multi-platform safe after this patch. > It breaks them in the same way as my commit 928055a01b3f ("iommu/exynos: > Remove custom platform device registration code") broke Exynos IOMMU. > > You need a similar fix for them: > https://www.spinics.net/lists/arm-kernel/msg627648.html hmmm, right, i did saw this fix in the rockchip iommu driver too. and there're also some other iommu drivers put bus_set_iommu in their probe() to avoid that. maybe we can do it in the iommu framework? for example: 1/ add a bus type member to struct iommu_device 2/ and a iommu_device_set_bus() 3/ do the bus_set_iommu stuff in iommu_device_register() 4/ undo bus_set_iommu in iommu_device_unregister()