From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC6E22E228D; Tue, 26 May 2026 02:51:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779763900; cv=none; b=UTir2S0Y2PjQGFuTzzzN58rEXQJVxJjGA5O297Z7CfhFCl2bNqZm89t7gycyGcT6y6IGfRMiyjUo9rnvAOEEwlrjLRRR/RNp+hDy3yyuWnG+UrTIJAltuotmifRd+XLHh7aoQ7sAS1Irm/HgWJ319rFHNPd176qDdfFlu1Oa9Bs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779763900; c=relaxed/simple; bh=Q0SA1wahtXF7MigqavcZlTFDH5o/LWC7CLvHR5LJWZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OjyYDMnIL4yp0la8hPTZtPtS6RlVy3W/TZsALX+Wg+K1lWVf7rdCnhNvnef1RuVn5+2pR8FPkUh64izZvJnqkBtmX9pGjunfJe8yPY/CLuf9Wcfjp+6iD+8jwbco08OIQrhcomNX4rr+RWeTNDDCoQGHNRD4t1qZHsFhjzS83RE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=lshQjeDN; arc=none smtp.client-ip=115.124.30.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="lshQjeDN" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1779763894; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=jpboweppnnvkz9bSP/WImjUak/uQCSkNUCSCMbQCCkM=; b=lshQjeDNq4T1bFG60vwO4cvqah2iw+g4UpztSDtEFTgYkTA9BbNpatEsePYo4L3vUsuoKMpiN/4SxjlaJFyG4sR09VU5nP334wHlJQSomH83qo1p0YgUAEOxqIgp+9BU0w3g/SQmr34j+HkVk7AIGkzrnndBP3Q62dHDztJDl3M= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=cp0613@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0X3egDr5_1779763893; Received: from DESKTOP-S9E58SO.localdomain(mailfrom:cp0613@linux.alibaba.com fp:SMTPD_---0X3egDr5_1779763893 cluster:ay36) by smtp.aliyun-inc.com; Tue, 26 May 2026 10:51:33 +0800 From: Chen Pei To: dave.jiang@intel.com, alison.schofield@intel.com, djbw@kernel.org, icheng@nvidia.com, bhelgaas@google.com, rafael@kernel.org, lenb@kernel.org, guoren@kernel.org Cc: linux-pci@vger.kernel.org, linux-cxl@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Chen Pei Subject: [PATCH 1/2] ACPI: PCI: Clear _DEP dependencies after PCI root bridge attach Date: Tue, 26 May 2026 10:51:17 +0800 Message-ID: <20260526025118.38935-2-cp0613@linux.alibaba.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260526025118.38935-1-cp0613@linux.alibaba.com> References: <20260526025118.38935-1-cp0613@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit PCI root bridges enumerated by acpi_pci_root_add() can be the _DEP supplier for other ACPI consumers, most notably ACPI0017 CXL root devices whose probe path depends on acpi_pci_find_root() succeeding. Once the root bus has been added, those consumers can safely be enumerated, so notify them by clearing the dependency. Call acpi_dev_clear_dependencies() at the end of acpi_pci_root_add(), after pci_bus_add_devices(), following the same pattern used by other ACPI suppliers such as the EC (drivers/acpi/ec.c) and the ACPI PCI Link device (drivers/acpi/pci_link.c). The clear is intentionally done only on the success path; on the error paths the supplier did not attach and consumers must keep dep_unmet set. This is a prerequisite for honoring _DEP on ACPI0016 host bridges, which matters on architectures where the probe order of acpi_pci_root relative to cxl_acpi is not guaranteed (e.g. RISC-V). Signed-off-by: Chen Pei Suggested-by: Dan Williams (nvidia) --- drivers/acpi/pci_root.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index a0ba64e45e8a..4c06c3ffd0cb 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -755,6 +755,10 @@ static int acpi_pci_root_add(struct acpi_device *device, pci_lock_rescan_remove(); pci_bus_add_devices(root->bus); pci_unlock_rescan_remove(); + + /* Clear _DEP dependencies to allow consumers to enumerate */ + acpi_dev_clear_dependencies(device); + return 1; remove_dmar: -- 2.50.1