Messages in this thread | ![/](/images/icornerl.gif) | | Date | Sun, 25 Jun 2023 02:04:33 +0900 | From | Krzysztof Wilczyński <> | Subject | Re: [PATCH] PCI: apple: Initialize pcie->nvecs before using it |
| |
Hello,
> apple_pcie_setup_port computes ilog2(pcie->nvecs) to setup the number of > MSIs available for each port. It is however called before apple_msi_init > which actually initializes pcie->nvecs. > Luckily, pcie->nvecs is part of kzalloc-ed structure and thus > initialized as zero. ilog2(0) happens to be 0xffffffff which then just > configures more MSIs in hardware than we actually have. This doesn't > break anything because we never hand out those vectors. > Let's swap the order of the two calls so that we use the correctly > initialized value.
Applied to controller/apple, thank you!
[1/1] PCI: apple: Initialize pcie->nvecs before use https://git.kernel.org/pci/pci/c/328a16477027
Krzysztof
| ![\](/images/icornerr.gif) |