From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0A06C433DF for ; Sun, 16 Aug 2020 10:42:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A5E520716 for ; Sun, 16 Aug 2020 10:42:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DbuA6S1Z"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PtCHVeBl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A5E520716 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WhWrJThWjfH7okKgBRoSzkGv56+nEDA7ZS1WvEeyFY0=; b=DbuA6S1ZPMEKBCdve/VwS5RJ0 njgkofU0Ivo06A7w/x52R2PQ/gbVeP/qZyQ+3j4QYkS+qe+Sy2RuJS0SIUGgfznp51ZE36SFDOnnA kmIsFOql4CnBjG/c1vTidD67NDMv2YZoR672tYkxFNL1Eni/UZh1HN7pbpcIiDuDOtSqEakRqupc2 W41EtJqHHe7zOiyRyytePvZ8ktWtBH2BV/DUiwJP2bVbH2RA1zjvHpRddI+MIoDKdVhd7WqMDGhyA XOM2EinbOVP4sUhKhSCOP7eDXyMAi2ROxE8zFnNG7HovGMQkhrlFNeKeKP8tVOnsOSz5xRDnpiw3F OWlvjo+xg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7G5B-0002dU-4Y; Sun, 16 Aug 2020 10:40:09 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7G56-0002d3-9F; Sun, 16 Aug 2020 10:40:05 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0BBDD20716; Sun, 16 Aug 2020 10:40:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597574403; bh=BrDq/zSYv3kdnFUzq+Kq8soHq2wInZuv6tFhet1DF0o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PtCHVeBlT2QOuB+fSkSF5ps8lT1KdfZ3g81khr+LcMhs1WewxNsgaesYc6zHfK2iJ W3Dm/9aoDx9PavYOyki29zndkUSQPUQaoitccpLPW2koviYylJRpLSpQispU4BX8ic hEnSTu4yQeXhTh5xgjjLbp/DAp1qkmi4BD/nx7TY= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7G52-003Hor-Qa; Sun, 16 Aug 2020 11:40:00 +0100 Date: Sun, 16 Aug 2020 11:39:53 +0100 Message-ID: <87pn7qnabq.wl-maz@kernel.org> From: Marc Zyngier To: Bjorn Helgaas Subject: Re: [PATCH 1/2] PCI: rockchip: Work around missing device_type property in DT In-Reply-To: <20200815232228.GA1325245@bjorn-Precision-5520> References: <20200815125112.462652-2-maz@kernel.org> <20200815232228.GA1325245@bjorn-Precision-5520> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: helgaas@kernel.org, linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, lorenzo.pieralisi@arm.com, heiko@sntech.de, shawn.lin@rock-chips.com, robh+dt@kernel.org, bhelgaas@google.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200816_064004_639987_E4C65546 X-CRM114-Status: GOOD ( 29.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Lorenzo Pieralisi , Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Roh Herring , Bjorn Helgaas , kernel-team@android.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, 16 Aug 2020 00:22:28 +0100, Bjorn Helgaas wrote: > > On Sat, Aug 15, 2020 at 01:51:11PM +0100, Marc Zyngier wrote: > > Recent changes to the DT PCI bus parsing made it mandatory for > > device tree nodes describing a PCI controller to have the > > 'device_type = "pci"' property for the node to be matched. > > > > Although this follows the letter of the specification, it > > breaks existing device-trees that have been working fine > > for years. Rockchip rk3399-based systems are a prime example > > of such collateral damage, and have stopped discovering their > > PCI bus. > > > > In order to paper over the blunder, let's add a workaround > > to the pcie-rockchip driver, adding the missing property when > > none is found at boot time. A warning will hopefully nudge the > > user into updating their DT to a fixed version if they can, but > > the insentive is obviously pretty small. > > s/insentive/incentive/ (Lorenzo or I can fix this up) > > > Fixes: 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser") > > Suggested-by: Roh Herring > > s/Roh/Rob/ (similarly) Clearly not my day when it comes to proofreading commit messages. Thanks for pointing this out, and in advance for fixing it up. > > > Signed-off-by: Marc Zyngier > > This looks like a candidate for v5.9, since 2f96593ecc37 was merged > during the v5.9 merge window, right? Absolutely. > I wonder how many other DTs are similarly broken? Maybe Rob's DT > checker has already looked? I've just managed to run the checker, which comes up with all kinds of goodies. Apart from the above, it also spots the following: - arch/arm64/boot/dts/mediatek/mt7622.dtsi: Has a device_type property in its main PCIe node, but not in the child nodes. It isn't obvious to me whether that's a violation or not (the spec doesn't say whether the property should be set on a per-port basis). Rob? - arch/arm64/boot/dts/qcom/msm8996.dtsi: Only one out of the three PCIe nodes has the device_type property, probably broken similarly to rk3399. I could move the workaround to drivers/pci/of.c, and have it called from the individual drivers. I don't have the HW to test those though. Thoughts? M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel