Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Sunil V L <sunilvl@ventanamicro.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	huyuye <huyuye812@163.com>, Bjorn Helgaas <bhelgaas@google.com>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Robert Moore <robert.moore@intel.com>,
	linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	dai.hualiang@zte.com.cn, deng.weixian@zte.com.cn,
	guo.chang2@zte.com.cn, liu.qingtao2@zte.com.cn,
	wu.jiabao@zte.com.cn, lin.yongchun@zte.com.cn,
	hu.yuye@zte.com.cn, zhang.longxiang@zte.com.cn,
	zuo.jiang@zte.com.cn, li.kunpeng@zte.com.cn,
	Sunil V L <sunilvl@oss.qualcomm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>
Subject: Re: [PATCH v2] ACPI: pci_root: Clear the acpi dependencies after PCI root bridge initialization on RISC-V
Date: Thu, 29 Jan 2026 19:19:43 +0530	[thread overview]
Message-ID: <aXtld38sQ9qFoNKk@sunil-laptop> (raw)
In-Reply-To: <20260127194648.GA368841@bhelgaas>

On Tue, Jan 27, 2026 at 01:46:48PM -0600, Bjorn Helgaas wrote:
> On Tue, Jan 27, 2026 at 06:50:24PM +0100, Rafael J. Wysocki wrote:
> > On Tue, Jan 27, 2026 at 6:26 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > On Tue, Jan 27, 2026 at 04:00:49PM +0100, Rafael J. Wysocki wrote:
> > > > On Mon, Jan 12, 2026 at 3:17 PM huyuye <huyuye812@163.com> wrote:
> > > > >
[...]

> > Not really.
> > 
> > acpi_dev_clear_dependencies() is related to the way Linux uses _DEP
> > which is to defer the enumeration of dependent devices until the
> > devices they depend on are ready.
> > 
> > So by calling acpi_dev_clear_dependencies() the driver basically
> > allows other drivers to bind to devices.
> 
> I assumed the dependency expressed by _DEP would be satisfied by the
> execution of some other ACPI method.  E.g., the dependency might be
> satisfied when a _REG method makes an opregion available (although the
> spec seems to suggest that's only one of the possible dependencies).
> 
> But in this case it sounds like RISC-V is using _DEP not because of
> any ACPI-related ordering requirement, but simply to enforce the OS
> enumeration order (and therefore naming).  I guess this refers to PCI
> device naming, so I suppose that dependency is on
> pci_acpi_scan_root().
> 
Right. Devices that use wired interrupts (or GSIs) depend on the APLIC
interrupt controller being probed first. ACPI uses the _DEP mechanism to
enforce this probe order. However, when multiple dependent PCI bridges
are present in the system, there is no guarantee that they will be
probed in the same order on every reboot. This patch addresses the issue
by adding _DEP relationships between the PCI bridge nodes in the
platform, ensuring that they are always probed in a deterministic
order.

> I thought udev was supposed to be the real solution for consistent
> naming.  Is this sort of a workaround to accomplish the same end?
>
Yes, Marc had suggested this as well, but it looks like it’s not easy to
use in this environment [1].

> In any case, your IS_ENABLED(CONFIG_RISCV) proposal seems fine to me.
> I think it's nice if we can avoid adding another __weak function.
> 
I agree. But I am not sure if ARM also can get into this situation with
GICv5. Adding Lorenzo.

[1] - https://lore.kernel.org/linux-riscv/20251126161540.6460-1-ni_liqiang@126.com/

Thanks,
Sunil

  parent reply	other threads:[~2026-01-29 13:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 14:07 [PATCH] ACPI: pci_root: Clear the acpi dependencies after PCI root bridge initialization on RISC-V huyuye
2026-01-08 14:04 ` Rafael J. Wysocki
2026-01-12 14:16 ` [PATCH v2] " huyuye
2026-01-13 21:56   ` Bjorn Helgaas
2026-01-14 12:32   ` [PATCH v3] " huyuye
2026-01-29 14:42     ` [PATCH v4] " huyuye
2026-01-27 15:00   ` [PATCH v2] " Rafael J. Wysocki
2026-01-27 17:25     ` Bjorn Helgaas
2026-01-27 17:50       ` Rafael J. Wysocki
2026-01-27 19:46         ` Bjorn Helgaas
2026-01-27 20:04           ` Rafael J. Wysocki
2026-01-29 13:49           ` Sunil V L [this message]
2026-02-19 15:47             ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aXtld38sQ9qFoNKk@sunil-laptop \
    --to=sunilvl@ventanamicro.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=bhelgaas@google.com \
    --cc=dai.hualiang@zte.com.cn \
    --cc=deng.weixian@zte.com.cn \
    --cc=guo.chang2@zte.com.cn \
    --cc=helgaas@kernel.org \
    --cc=hu.yuye@zte.com.cn \
    --cc=huyuye812@163.com \
    --cc=li.kunpeng@zte.com.cn \
    --cc=lin.yongchun@zte.com.cn \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=liu.qingtao2@zte.com.cn \
    --cc=lpieralisi@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=sunilvl@oss.qualcomm.com \
    --cc=wu.jiabao@zte.com.cn \
    --cc=zhang.longxiang@zte.com.cn \
    --cc=zuo.jiang@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox