From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B53683CAE for ; Mon, 15 Apr 2024 17:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713200619; cv=none; b=YbZOk0buoaTbFzQLJpJX6SNJ9+6m5JyJ3o3plET/PTb35HEfTDnZn8/pNBgb/eI8Cazo4qI7Lm6t3dmH3aKXri8f5HHelhx/tzABtAdMeH+lx0NDgwNOMdV7OyUwdFVDrmv9vUgru+NzO5qHbLUOr4E2evH1Da3i0PsXGCkcP14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713200619; c=relaxed/simple; bh=egibTauTOK5De6SrAZsOC/2NVkpwGlv29Ym3R/RrsZM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q2ptgCcrQrWAVkLYWUqOgaZ06hvgf+Wo03HkjpIoYvmvmH0x+TV606WXxYBBclZaihwQLBnVGC9VeQvlU53g1IgX3Pf5WT2qTGFWbktd1T5Ci+JIr4yBvWZnaCJZTOiyD5ICbdCrNQytW6mAIwIVcHaajV5Z1gy3AAtJCjLBPFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=X2W046K0; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="X2W046K0" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6ecf05fd12fso3345213b3a.2 for ; Mon, 15 Apr 2024 10:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1713200618; x=1713805418; darn=lists.linux.dev; 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=O4XnyCkVtMil3j8A/KjvpJf48jXr01BLYuVmlXnWMII=; b=X2W046K0hQXztBMrOlUgB4L4dWfJc9slKoLDrp4gobDRvAXMvaHmpwxlvB2JhHN+Xs iVcPwLYUcJOQoC6E9lDcbpcf/tXLOojL1UHghYeKtf5kXTljJmlrqWhFnzSE4VdLf8pP I2ae/0QIWTgspqGoEMsArCCXQYf3faWrx5lqX7i97aWYHMMw2Y4QFT3DBfFIBlZPnMTr cqbrNHVlyt5+yvqe+3dEwqQtAqYAmCwmjvd1cK3zse+1mhD4m0V9NlM1WcJK4ncbIkF/ SUhUHPHA6vc9z6fpiVi1XgWihUorobZdcl21xYP3OKpB6sYVIX4nlZYQszcWgNDuA5N+ vFfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713200618; x=1713805418; 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=O4XnyCkVtMil3j8A/KjvpJf48jXr01BLYuVmlXnWMII=; b=Y8W5TGzumeWu2Xl/B+pgLHrWFIjuk0G3vhiXOzSpcVvqqVEjQ1J9MaN38dRtEUjcnY X7JiCHpOQo92HeqUVay5U0oIo9saSEPUrecEhuzxjaY8JlZ44+vFybmvvepONYx8FcE3 mWSJodCXkfmwlVIre3D/OAw6JPSo/c6VpgQuH9rbqpZZBTYnuxGr5sGLDjOr1CZEBo/J tfZIduEtr9bO7wxgqJaW7dAWspU003LU7wIbxkqeI2IUpjWUx2ibmB6hJ4EuuiJJRVzV kpZU3VMjRVFBPvwOPqSeN4Vk8fCVGS1mh/m4OQma9lGzuWFkvhzSo0PdEnUBLAi1H7Uj MPzg== X-Forwarded-Encrypted: i=1; AJvYcCXj5f28qpbxZNgy8Rat6XeV4mGivQALgUBnpeu+jF6cSftzy3LHsUHazPtUYGItRPVDySWNGP82nbTTF/snLX5DNz6h73OlODXJlrkY X-Gm-Message-State: AOJu0YxHIymuQUXnJRREEhRlPZdMT52mwwTOGn72b68n6nidnRK/UvTG W/04J5ajZBBMi9rzgwsgUxkecqmpxgLKBagmvs9glJyXCg2dmbi+E+uu0rk3og4= X-Google-Smtp-Source: AGHT+IEZ3MSxzXsGAz+ZLkxl8S7XJ3zcQ2NIg6LwPVYoJf81xxbiq6s9OomXLtGiFPJD3YOtkLtUPQ== X-Received: by 2002:a05:6a00:acb:b0:6ed:21d5:fc2c with SMTP id c11-20020a056a000acb00b006ed21d5fc2cmr12682862pfl.26.1713200617123; Mon, 15 Apr 2024 10:03:37 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.187.230]) by smtp.gmail.com with ESMTPSA id 1-20020a056a00072100b006ed045e3a70sm7433158pfm.25.2024.04.15.10.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 10:03:36 -0700 (PDT) From: Sunil V L To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, acpica-devel@lists.linux.dev Cc: Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Robert Moore , Haibo1 Xu , Conor Dooley , Andrew Jones , Atish Kumar Patra , Andrei Warkentin , Marc Zyngier , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Sunil V L Subject: [RFC PATCH v4 20/20] ACPI: pci_link: Clear the dependencies after probe Date: Mon, 15 Apr 2024 22:31:13 +0530 Message-Id: <20240415170113.662318-21-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240415170113.662318-1-sunilvl@ventanamicro.com> References: <20240415170113.662318-1-sunilvl@ventanamicro.com> Precedence: bulk X-Mailing-List: acpica-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 added between Link device and PCI Host Bridge, then the PCI end points can get probed prior to link device unable to get mapping for INTx. So, add the link device's HID to dependency honor list and also clear it after its probe. Signed-off-by: Sunil V L --- drivers/acpi/pci_link.c | 3 +++ drivers/acpi/scan.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index aa1038b8aec4..48cdcedafad6 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -748,6 +748,9 @@ static int acpi_pci_link_add(struct acpi_device *device, if (result) kfree(link); + if (IS_ENABLED(CONFIG_ARCH_ACPI_DEFERRED_GSI)) + acpi_dev_clear_dependencies(device); + return result < 0 ? result : 1; } diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 086ae040a5ad..32865af071ce 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -835,6 +835,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.40.1 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 8EE4FC4345F for ; Mon, 15 Apr 2024 17:06:05 +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=f/Yx0B0ysNYeW7dIL5Pxh6J7MNvEuOAjUQd/M5tnBj4=; b=M4qJfCiDnkaEXQ OnAyfzbzt3PbMw2za5NLJtSzmqAu7vm4H6CC7rv8hazBvZ74SBt6V7pjFgdfxJd1gQmLIdjgAJMR0 tARzzxTk30iLjkEudSR/URmQyQ3XBPCwXI5l+4KWQE9u5ZSrHHYNRUczOYvNxSAPdYyX5o+HT3tb7 YN1eE8qwPxzlD0y1hMiR3s3VGuFbTxGL0viuD/mne/o5yXw40k64CuvvSkutyexaViwllM35dM6LM xSG8PNrLwqQ3+Nw7a4v5LPODosIkkbsmsOEuPNIcmO0cd+riotsTCtAIeGdXmOlqz44QdZ9v/ncru lplp6tf+0kNhSyt66rVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwPmK-00000009EXB-1KIs; Mon, 15 Apr 2024 17:06:00 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwPk2-00000009Cga-2zoJ for linux-riscv@lists.infradead.org; Mon, 15 Apr 2024 17:03:47 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6e782e955adso3474923b3a.3 for ; Mon, 15 Apr 2024 10:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1713200618; x=1713805418; 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=O4XnyCkVtMil3j8A/KjvpJf48jXr01BLYuVmlXnWMII=; b=AOSTBGfwJld2+KHSPUWivgENSTWMQwPjj9wdBYi98mH+OQHRvIoBLj7nSGZ852+bPS e+0A/mkOlXZnovGmho4huqYhDApU+ix38G28B3E35OUd+ecQ64Fta6jxBSRnMWpWdxwv ii+J3IvU6OyZpbRJCokGfC1BgGGV+b2b3GulXpa/kqQlrDjAFcNWe9CIVglbpDSi93HD 92wnb0xa8KqgSVRzb0OnVOrRflxXKF/jY3zf8oYusyQ73AYF/36Mj6iisCduswhGH1Oy zM0s/ghoxDFPHKD/if6wVnIOqfshuiH4bchnMgGKoSv58P897aeQyxdmYxaUWg/2Cn1L 6dTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713200618; x=1713805418; 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=O4XnyCkVtMil3j8A/KjvpJf48jXr01BLYuVmlXnWMII=; b=oaDHGjxESuLU7fV+sKMVXSM/GiU4fTJFLQGvtbaM5Hbozwe6m2VI330C7HbNSJP+UM XBqZeYksyMyd6TZVrUDwrfPAhKs257UP5CUhNLhk8Q0VNeb0Ib6MBUppbV6UtnUAXXap xZwn+hRTDXTn3xAs43kHF1OTNMMJzuYDd3K/huAQJa4EapNzd9ffzlTNw6J7yPTKtUW/ 9L6EpyCux1EOdd0a3fYnGG1yFaFyLIqElyU3acqdM1aBo0Im+l7Q3gm39Qr9IZwBJTHu WUneMmGV5txEf5Tv4hibSIsR6NTzrFwrdNdA9lNb4uuvBuJmIZsJwEzvc5Pb2aZnnI/R bz1g== X-Forwarded-Encrypted: i=1; AJvYcCUaGH8V2XSu+g8KnBZm8gWoaOdG2Mppw69jewfcNuhYHHIXYgUcJtCD7FG8ho+5RPw4AzYCS8Roo2GFabhkDq6ECMK8xTOHF0sRHFZJqghQ X-Gm-Message-State: AOJu0YzJW7eSrzkLctK0iOU+4QMLcE80aBqg64M2ltB5X12WD20QC3bW affykt5TREOTZVqQbfdf63CP27GXZ5uELVn+03zkjs6guD0RPxwmZ/LTXcqBPC4= X-Google-Smtp-Source: AGHT+IEZ3MSxzXsGAz+ZLkxl8S7XJ3zcQ2NIg6LwPVYoJf81xxbiq6s9OomXLtGiFPJD3YOtkLtUPQ== X-Received: by 2002:a05:6a00:acb:b0:6ed:21d5:fc2c with SMTP id c11-20020a056a000acb00b006ed21d5fc2cmr12682862pfl.26.1713200617123; Mon, 15 Apr 2024 10:03:37 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.187.230]) by smtp.gmail.com with ESMTPSA id 1-20020a056a00072100b006ed045e3a70sm7433158pfm.25.2024.04.15.10.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 10:03:36 -0700 (PDT) From: Sunil V L To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, acpica-devel@lists.linux.dev Subject: [RFC PATCH v4 20/20] ACPI: pci_link: Clear the dependencies after probe Date: Mon, 15 Apr 2024 22:31:13 +0530 Message-Id: <20240415170113.662318-21-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240415170113.662318-1-sunilvl@ventanamicro.com> References: <20240415170113.662318-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_100338_894880_5D7F5EAD X-CRM114-Status: GOOD ( 11.81 ) 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: Marc Zyngier , Albert Ou , Haibo1 Xu , "Rafael J . Wysocki" , Catalin Marinas , Anup Patel , Atish Kumar Patra , Robert Moore , Samuel Holland , Conor Dooley , Palmer Dabbelt , Andrei Warkentin , Paul Walmsley , Bjorn Helgaas , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Thomas Gleixner , Andrew Jones , Will Deacon , Len Brown Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 added between Link device and PCI Host Bridge, then the PCI end points can get probed prior to link device unable to get mapping for INTx. So, add the link device's HID to dependency honor list and also clear it after its probe. Signed-off-by: Sunil V L --- drivers/acpi/pci_link.c | 3 +++ drivers/acpi/scan.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index aa1038b8aec4..48cdcedafad6 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -748,6 +748,9 @@ static int acpi_pci_link_add(struct acpi_device *device, if (result) kfree(link); + if (IS_ENABLED(CONFIG_ARCH_ACPI_DEFERRED_GSI)) + acpi_dev_clear_dependencies(device); + return result < 0 ? result : 1; } diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 086ae040a5ad..32865af071ce 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -835,6 +835,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.40.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 045F8C04FF9 for ; Mon, 15 Apr 2024 17:07:09 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=PBjNjCXWASe52av6AiHVMGH4B5l5TVUYJ58T3L2IRjo=; b=QbXmedglhBBdHe wxqWA4TBTvOIIWo6FeE0ODzuZxDiN89NbpGDX+zPPQoFFeilI2TTzT1SZ+jrecntrA/I3cAR7YC8Z 2mxUDnwbfLQpMwFnxUMeaz+ZXwMXhB4AMLq5rtvO5qtUqLPLpk4i5UurjzlGmTxYvFt8IqrH56Oom lngx1BKkWZU2sPr5FTne4Il3OXWhkShU/inKbIQOJOsr8uLeZjpyZUK9i9QSpEBpaXRMYaDs2fBeB 95OVNbfxDBgjCaaZmHDC3QYILRdtq8V3xRWUv6VRwjWl03N+hnGWd6QSfK4LCDhTPLF0qQgY/0MJH WUHQq1RS4w8dE2OEZGtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwPnG-00000009F5r-3xRV; Mon, 15 Apr 2024 17:06:58 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwPk2-00000009Cgg-3s5n for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 17:03:49 +0000 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ecff9df447so3555292b3a.1 for ; Mon, 15 Apr 2024 10:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1713200618; x=1713805418; 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=O4XnyCkVtMil3j8A/KjvpJf48jXr01BLYuVmlXnWMII=; b=AOSTBGfwJld2+KHSPUWivgENSTWMQwPjj9wdBYi98mH+OQHRvIoBLj7nSGZ852+bPS e+0A/mkOlXZnovGmho4huqYhDApU+ix38G28B3E35OUd+ecQ64Fta6jxBSRnMWpWdxwv ii+J3IvU6OyZpbRJCokGfC1BgGGV+b2b3GulXpa/kqQlrDjAFcNWe9CIVglbpDSi93HD 92wnb0xa8KqgSVRzb0OnVOrRflxXKF/jY3zf8oYusyQ73AYF/36Mj6iisCduswhGH1Oy zM0s/ghoxDFPHKD/if6wVnIOqfshuiH4bchnMgGKoSv58P897aeQyxdmYxaUWg/2Cn1L 6dTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713200618; x=1713805418; 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=O4XnyCkVtMil3j8A/KjvpJf48jXr01BLYuVmlXnWMII=; b=jsWcYOyFhyT8c4FX7klHdUT1RIPoOPhqRcCelyL30JXu4YvzVsmnSxpkqINDHGOY5b p6hLdutw0l+E6ornR3+f8CFUuFMw1XIi4G5Q/ensv6OssBRGYuNczkRfb53ekZL2+XwU pbf7gvnYtmp/nf0nj/7GcLeR1v7OK34ui/jeBkCdCv6jfGw/s1SJxtITHSuSgzukM+bR jSkRgfvl47uTXjsDH6x0F7lc/SYl36ZeTyvBBh+v5BOKdT8VDnnAWHpfnO2NemcdEmGo 5PN6T8ey0MnS02jt3QUq6hhg8eLotm5M1CtJPxYFCaMSceuQjUcEXxysfFcdeVhP2Wq4 uw9A== X-Gm-Message-State: AOJu0Yy2IfYEMvH9b3jTMVPidpwHHaOuMhF+gPfKzPkfxMeXGjuTYUbm 2pqPRfG2gEL0FoM3iB+hBMjP/XdFhjcl7Ro6WHvIyQ8eOULozgooQfIQr3Yog7NBn1uwL2i9Qj7 O0Po= X-Google-Smtp-Source: AGHT+IEZ3MSxzXsGAz+ZLkxl8S7XJ3zcQ2NIg6LwPVYoJf81xxbiq6s9OomXLtGiFPJD3YOtkLtUPQ== X-Received: by 2002:a05:6a00:acb:b0:6ed:21d5:fc2c with SMTP id c11-20020a056a000acb00b006ed21d5fc2cmr12682862pfl.26.1713200617123; Mon, 15 Apr 2024 10:03:37 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.187.230]) by smtp.gmail.com with ESMTPSA id 1-20020a056a00072100b006ed045e3a70sm7433158pfm.25.2024.04.15.10.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 10:03:36 -0700 (PDT) From: Sunil V L To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, acpica-devel@lists.linux.dev Cc: Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Robert Moore , Haibo1 Xu , Conor Dooley , Andrew Jones , Atish Kumar Patra , Andrei Warkentin , Marc Zyngier , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Sunil V L Subject: [RFC PATCH v4 20/20] ACPI: pci_link: Clear the dependencies after probe Date: Mon, 15 Apr 2024 22:31:13 +0530 Message-Id: <20240415170113.662318-21-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240415170113.662318-1-sunilvl@ventanamicro.com> References: <20240415170113.662318-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_100339_082446_34536E0A X-CRM114-Status: GOOD ( 13.34 ) 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: , 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 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 added between Link device and PCI Host Bridge, then the PCI end points can get probed prior to link device unable to get mapping for INTx. So, add the link device's HID to dependency honor list and also clear it after its probe. Signed-off-by: Sunil V L --- drivers/acpi/pci_link.c | 3 +++ drivers/acpi/scan.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index aa1038b8aec4..48cdcedafad6 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -748,6 +748,9 @@ static int acpi_pci_link_add(struct acpi_device *device, if (result) kfree(link); + if (IS_ENABLED(CONFIG_ARCH_ACPI_DEFERRED_GSI)) + acpi_dev_clear_dependencies(device); + return result < 0 ? result : 1; } diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 086ae040a5ad..32865af071ce 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -835,6 +835,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.40.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel