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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 024C2C5320E for ; Thu, 22 Aug 2024 21:45:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=Yhaxco5vU1CZJcUhZBdOiKImfqXa/IuQH1Qtqs/XGqw=; b=TWgzNnFsBtyvtzeTw5GeTczn5O fKkO0j6YYhCKF4nqLVWffaCs8SgkVx39QW/sVoDl1xLdtcY9zN70hVJupJshD6nCNEPez11ua4NqH UcCf/BAZoymtD+HrHXdrl/iMKavMxfnJpDkJkcGajDzS0zoDXdVK0tRNZ0h4NfntsdhTHzj5/GE6G cA05p30XfXz1XoGOVrSVPYYbMjWnMiEfmlRgrqoHvGrKCScoqEhA4HjVo/dI6mlAd74QaB8gUZUQ/ AyvjYs5qFjTuCDu52urkLeFUYFxXtRA03Hh7WYB6RzzspifybU0il/+VZmR8+K9ejS33kvT3PUH+s WbWSEFYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shFcC-0000000EOaD-0Kum; Thu, 22 Aug 2024 21:45:08 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shFbP-0000000EOQ2-1Djz; Thu, 22 Aug 2024 21:44:20 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E5ABA6125B; Thu, 22 Aug 2024 21:44:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 396D8C32782; Thu, 22 Aug 2024 21:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724363057; bh=wouLQ1NMCmEgVtTZfpizED4KYxY6busZQVGhvu31U9w=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Xs2zFAA9+v+tdLOs3jXLguv9xMVkhnYJ59w6LWKQLse0VkgpY4n3M9GfnAqMgUxgg mNQgmv2j5woLX2DsJDcZWJtxsWxnZVNLcQR3pLujkDw/ccz0d5tabsnuK/iD6TBGsB t6sXdIdz+6bLGcQqNRCzCRhpIqLFDYniLxrB8/L+wpQtGPGmvs+j/2iANc7GyIs+Hl cDGTOu9lQTSkUNeYComLCaJ5NUiIQBlMmJScKnb/2i64YGpmxy1cQVdiCZjBJd6vtr O+bq13w1mDVy67a72wMbT+OsLDdhhGwPMprv02UfNs2rIRUeKc3Sl1v8pgSefHlAsE 01Ok7tLTOSowg== Date: Thu, 22 Aug 2024 16:44:15 -0500 From: Bjorn Helgaas To: Sunil V L Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Robert Moore , Conor Dooley , Haibo Xu , Andrew Jones , Atish Kumar Patra , Drew Fustini , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH v8 08/17] ACPI: pci_link: Clear the dependencies after probe Message-ID: <20240822214415.GA351762@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240812005929.113499-9-sunilvl@ventanamicro.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_144419_439375_D194BCE6 X-CRM114-Status: GOOD ( 22.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 12, 2024 at 06:29:20AM +0530, Sunil V L wrote: > RISC-V platforms need to use dependencies between PCI host bridge, Link > devices and the interrupt controllers to ensure probe order. The > dependency is like below. > > Interrupt controller <-- Link Device <-- PCI Host bridge. > > If there is no dependency between Link device and PCI Host Bridge, > then PCI devices may be probed prior to Link devices. If a PCI > device is probed before its Link device, we won't be able to find > its INTx mapping. This seems to explain why we want these dependencies, which is useful, but *this* patch only removes the dependencies. Maybe this description should be in the patch that *adds* the dependencies, e.g., "ACPI: RISC-V: Implement function to add implicit dependencies"? > So, add the link device's HID to dependency honor list and clear the > dependency after probe is done so that the dependent devices are > unblocked to probe. This still claims this patch adds HID, which I don't think it does. > Signed-off-by: Sunil V L > Tested-by: Björn Töpel > --- > drivers/acpi/pci_link.c | 2 ++ > drivers/acpi/scan.c | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c > index aa1038b8aec4..b727db968f33 100644 > --- a/drivers/acpi/pci_link.c > +++ b/drivers/acpi/pci_link.c > @@ -748,6 +748,8 @@ static int acpi_pci_link_add(struct acpi_device *device, > if (result) > kfree(link); > > + acpi_dev_clear_dependencies(device); > + > return result < 0 ? result : 1; > } > > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index 28a221f956d7..753539a1f26b 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -863,6 +863,7 @@ static const char * const acpi_honor_dep_ids[] = { > "INTC10CF", /* IVSC (MTL) driver must be loaded to allow i2c access to camera sensors */ > "RSCV0001", /* RISC-V PLIC */ > "RSCV0002", /* RISC-V APLIC */ > + "PNP0C0F", /* PCI Link Device */ > NULL > }; > > -- > 2.43.0 >