From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbdIVJvf (ORCPT ); Fri, 22 Sep 2017 05:51:35 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55544 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752199AbdIVJvd (ORCPT ); Fri, 22 Sep 2017 05:51:33 -0400 Subject: Re: [PATCH v2] iommu/of: Remove PCI host bridge node check To: Joerg Roedel Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, jean-philippe.brucker@arm.com References: <7ff4e56719d2e90426d9338eab00396bb2b61995.1505988973.git.robin.murphy@arm.com> <56a797382ffc65243169205c36d9f9fb1173dddd.1505989095.git.robin.murphy@arm.com> <20170922085618.GI8398@8bytes.org> From: Robin Murphy Message-ID: <49550b7b-b5bc-6687-dc5d-3a71605389ca@arm.com> Date: Fri, 22 Sep 2017 10:51:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170922085618.GI8398@8bytes.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/09/17 09:56, Joerg Roedel wrote: > Hey Robin, > > On Thu, Sep 21, 2017 at 11:20:58AM +0100, Robin Murphy wrote: >> of_pci_iommu_init() tries to be clever and stop its alias walk at the >> device represented by master_np, in case of weird PCI topologies where >> the bridge to the IOMMU and the rest of the system is not at the root. >> It turns out this is a bit short-sighted, since there are plenty of >> other callers of pci_for_each_dma_alias() which would also need the same >> behaviour in that situation, and the only platform so far with such a >> topology (Cavium ThunderX2) already solves it more generally via a PCI >> quirk. As this check is effectively redundant, and returning a boolean >> value as an int is a bit broken anyway, let's just get rid of it. >> >> Reported-by: Jean-Philippe Brucker >> Signed-off-by: Robin Murphy > > Can you send me a Fixes: tag for this please? No need to resend the > whole patch, I just need the tag. Sure, I'd go for: Fixes: d87beb749281 ("iommu/of: Handle PCI aliases properly") The check itself originally dates back to b996444cf35e ("iommu/of: Handle iommu-map property for PCI") but it's really not worth backporting past the above refactoring - it's only with da4b02750a9f ("iommu/of: Fix of_iommu_configure() for disabled IOMMUs") in 4.14-rc1 that it started to have noticeable ill effects. Thanks, Robin.