Re: [PATCH] of: dynamic: notify before revert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 28, 2024 at 12:13 AM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx> wrote:
>
> From: Peng Fan <peng.fan@xxxxxxx>
>
> When PCI node was created using an overlay and the overlay is
> reverted/destroyed, the "linux,pci-domain" property no longer
> exists, so of_get_pci_domain_nr will return failure. Then
> of_pci_bus_release_domain_nr will actually use the dynamic IDA,
> even if the IDA was allocated in static IDA.

That usage is broken to begin with unless there is a guarantee that
static and dynamic domain numbers don't overlap. For example, a
dynamic number is assigned and then you load an overlay with the same
number defined in it.

> So move the notify before revert to fix the issue.

You can't just change the timing. Something might require notify to be
after the revert.

> Fixes: c14f7ccc9f5d ("PCI: Assign PCI domain IDs by ida_alloc()")

I don't see where the notifier is even used.

Rob





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux