From patchwork Mon Aug 12 00:59:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 13759955 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 192B9C3DA4A for ; Mon, 12 Aug 2024 01:05:31 +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:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7ZXNFNaxM8vBPLxvkIIPrWaUY6tMJ6nPhDNbuDGhUyQ=; b=vHLZDdpPZNZc2TwmCJus0sgGe8 JSZyc1d3YrlBGE5J3poAh1Arg8rBmb7EbdlWx3Lz6wZ8pVh5QRrL/KzKvSlmQHkLnkHfGO+ZjKP1k 6Ey3mcgdTw1u82WGgieVE5P8EK5LJj6D8bt0Qlq/I0poFKnSfMZIbzPNSx1XgCugJRgPIyiTsfDrG 4Ow61pwNk/XI6/J5d+r+6+qzNxazIbhse52ZEXTFjANQEDjdx9m+tMu3xFA2Ivi7IsXHjGb9tBQAn qdo2RriCgrr+o0aZ7rrXD9MJx7Y2FeEZqx3j3IWA7Z1nWAkZUNQ70cJdWfs0qGM0Ao4UZnO1W/Uwi fRsHTicw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJUu-0000000Gbqb-4AZf; Mon, 12 Aug 2024 01:05:21 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJQG-0000000Ga7E-1llE for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2024 01:00:36 +0000 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-3db130a872fso2879128b6e.2 for ; Sun, 11 Aug 2024 18:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1723424431; x=1724029231; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7ZXNFNaxM8vBPLxvkIIPrWaUY6tMJ6nPhDNbuDGhUyQ=; b=XCtVA446Fxre2uFuCk+TmDYP5BZANcp0e9vAUNE+JIzCphmOf1T3ojeTKyB6LzB64a pvDp7p2G9yCABGcE+fp6exsw2WiLR/K4lx/NAvBaKokE6vLOA3R7kabA5efyUeTeqdmL 8zPEbi9Eu9zdjtWsJqT3gg41YqxnZX87qnUXyQsSX5506eeYuwJQXYZesWgBfxigvJhY og5ualS/JhKRIINXlwl73iNO9FrmkqMoq/+D7IUNEJ0P+oQSjGGE4Z7ttYD5h48/Dtat 2MpTdrcPhHncdctJ2ozOzc1KwaFihNDb5Eu7ZI7I1Rb0Oaf4u7bKzya2/H77GcL98WZo TjtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723424431; x=1724029231; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7ZXNFNaxM8vBPLxvkIIPrWaUY6tMJ6nPhDNbuDGhUyQ=; b=Nj+QwqYrJplgt8o6DJ7Sz8LteJLi6TeAxpiU0lNuQjQcRS6fuYMYuIixpGtFaFjr4T huVS6bxMM6ULHZ+XJSjowJeK0Pj4Zv2m3F3Ql9S9jEqNflSWTBeUUaIfRBFASQ3mhUSU U5bvKPEsmnYGDdlb1+MV/AK1hTZuodM5D6nlEoojHDxKKUIyvUOGDw0p2I2c78A6ZspL blr9a7G4K3ImkdeiP+Wf94nmiDzff4Wi0CtrOA2U81XbTl97cnu979X+/vtndF4MPPJy J+dpBcL01H8Cj1bBP/D/L1N4fwJdZ+l+JKJkxGfwnET8v224xIMbYWiRPAlQjeGlle2M Ojxg== X-Forwarded-Encrypted: i=1; AJvYcCX1wv84+x35NzouwD4NFq1QMWn1OwLRoCECiBnyWDglwLMQDkfEiP6Ad3s9M3P2nNi+KiBzRkrNAtnn8/nlA8xuSg7DZmafWEKGMlFbSO3nUnHSrWc= X-Gm-Message-State: AOJu0Yxs198ewWjmA/q0Uyz5Z4QFbnN1ZCoQhBYWM32qf7tXOnbwrvaC g8BbWnGai4DuNxstcd4rfiqHWcrVi/ePwcubxEDLg5cgj/yMXZkFgACyowo6sqI= X-Google-Smtp-Source: AGHT+IE9UN/eFl1Fb5sxAtzGTPfmVg74o1vo9nXqbGis0UuD39tez7iI9A3QbSPr+XUfKWTJWNIKOQ== X-Received: by 2002:a05:6808:2f10:b0:3d9:40c2:eb54 with SMTP id 5614622812f47-3dc416688bdmr13217183b6e.5.1723424431425; Sun, 11 Aug 2024 18:00:31 -0700 (PDT) Received: from sunil-pc.tail07344b.ts.net ([106.51.198.16]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c3dbe8cbdcsm3074062a12.61.2024.08.11.18.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Aug 2024 18:00:30 -0700 (PDT) From: Sunil V L To: 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 Cc: 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 , Sunil V L , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= Subject: [PATCH v8 08/17] ACPI: pci_link: Clear the dependencies after probe Date: Mon, 12 Aug 2024 06:29:20 +0530 Message-ID: <20240812005929.113499-9-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240812005929.113499-1-sunilvl@ventanamicro.com> References: <20240812005929.113499-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240811_180032_556248_1B1EAC53 X-CRM114-Status: GOOD ( 13.67 ) 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 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. 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. 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 };