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: 13759961 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 ABD22C3DA4A for ; Mon, 12 Aug 2024 01:05:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aYurf6cClLI2y+xI+8lRN4RQgJTTxcUmX/sBbe5y/u8=; b=yqX6AoyCAm3/bN I672bMCjmN9PQZJrOUP/eDaqcRnK7KvcsjPxGK+a4f95hJJYh7oioZlhTtgcPNZmeOnTJ/HipbWSA TB3KqTBx2u85i78+YQnPZEQYlHZr3ZsO1ntKbtnx8z/l9bvZ6iakhyZ8SvmQqx6r0OxG/TuZDP+ov 7xJ1+49ZbpKOscfnLyQbI75bku5u5KxolzwUipPHOSke9+iDJqHvViae6q7Tp1ZLljz+mQVR5/VHR OmNJtHyUYS9WYcqntlv+ymsqTGbN8TRpCEYJ4DxImjavPp49tk7QBq8zSieWLXkKFSUsm56ertd5h W+n25B1j6VqCjS8jp4Tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJUv-0000000Gbqp-3lMS; Mon, 12 Aug 2024 01:05:21 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdJQG-0000000Ga7H-2Exq for linux-riscv@lists.infradead.org; Mon, 12 Aug 2024 01:00:37 +0000 Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3db51133978so2811220b6e.3 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=dJQuKgWmgxLJDO43KZZOlA714rO/kbd+6lxpOYWkNMbn+aDphKAxXLJWG6bWLJ56Q+ BHPLJSh3mzFVbCNYVTM6xrYFxwWKhlueNKa1HVOA9om3EhyM+zqj58eV1+7OfiK5JBXv yaRhHDmgB+19G+BvlUNnXj9NVTVDUYno0lonJg2wm0h6Gh5ujHqDuRQ5DSrXvEcrsqxg N6FmD99aZj49OIe0277KdlQAn8tK2TSkPBWHBfe34iwEeBELSLHeWuGdE4ZENs1hyj1A Lw5KlrT5kpd1xjfdoIxHaqxtNeMDz9jy/5CnP9G/ZfroU8VymGO8EynyFCK/yJX/6Q02 /BTQ== X-Forwarded-Encrypted: i=1; AJvYcCUQSXeOREXHIVT8VBjlmimJbCo1gy5GGFm1/soYxgu48kHdYPHVmQtjMrMyw+fh7yNCsAoM/bzffc4W5ywK6oDJSxxhXBhyUbSlaj+khhLr X-Gm-Message-State: AOJu0YyHDAbYGPt2/ozJiodNS0PhH8GIOHyFVSm08guAJErvqTVNUBpD Mb03w+hNkBysaPz/v6K6zNHXISZMcBVnLW4htCcK3ntm+SwJyphaD8CfoDeuhuE= 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 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_613811_3A21C125 X-CRM114-Status: GOOD ( 12.05 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Ou , Haibo Xu , "Rafael J . Wysocki" , Anup Patel , Atish Kumar Patra , Robert Moore , Samuel Holland , Conor Dooley , Palmer Dabbelt , Drew Fustini , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Paul Walmsley , Bjorn Helgaas , Thomas Gleixner , Andrew Jones , Will Deacon , Len Brown Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=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 };