Thread (59 messages) 59 messages, 6 authors, 2021-12-08

Re: [patch V2 01/23] powerpc/4xx: Remove MSI support which never worked

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2021-12-07 11:36:09
Also in: ath11k, linux-hyperv, linux-mips, linux-pci, lkml, sparclinux, xen-devel

Cédric Le Goater [off-list ref] writes:
Hello Thomas,

On 12/6/21 23:27, Thomas Gleixner wrote:
quoted
This code is broken since day one. ppc4xx_setup_msi_irqs() has the
following gems:

  1) The handling of the result of msi_bitmap_alloc_hwirqs() is completely
     broken:
     
     When the result is greater than or equal 0 (bitmap allocation
     successful) then the loop terminates and the function returns 0
     (success) despite not having installed an interrupt.

     When the result is less than 0 (bitmap allocation fails), it prints an
     error message and continues to "work" with that error code which would
     eventually end up in the MSI message data.

  2) On every invocation the file global pp4xx_msi::msi_virqs bitmap is
     allocated thereby leaking the previous one.

IOW, this has never worked and for more than 10 years nobody cared. Remove
the gunk.

Fixes: 3fb7933850fa ("powerpc/4xx: Adding PCIe MSI support")
Shouldn't we remove all of it ? including the updates in the device trees
and the Kconfig changes under :

arch/powerpc/platforms/44x/Kconfig:	select PPC4xx_MSI
arch/powerpc/platforms/44x/Kconfig:	select PPC4xx_MSI
arch/powerpc/platforms/44x/Kconfig:	select PPC4xx_MSI
arch/powerpc/platforms/44x/Kconfig:	select PPC4xx_MSI
arch/powerpc/platforms/40x/Kconfig:	select PPC4xx_MSI
This patch should drop those selects I guess. Can you send an
incremental diff for Thomas to squash in?

Removing all the tendrils in various device tree files will probably
require some archaeology, and it should be perfectly safe to leave those
in the tree with the driver gone. So I think we can do that as a
subsequent patch, rather than in this series.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help