OSDN Git Service

powerpc/4xx: Remove MSI support which never worked
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Dec 2021 22:27:25 +0000 (23:27 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 9 Dec 2021 10:52:20 +0000 (11:52 +0100)
commit4f1d038b5ea1b45d8265a5407712f975b600bb94
tree93c9fd920ddcc35bf9ec4565ff5f2c722fae690d
parent0fcfb00b28c0b7884635dacf38e46d60bf3d4eb1
powerpc/4xx: Remove MSI support which never worked

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")
Fixes: 247540b03bfc ("powerpc/44x: Fix PCI MSI support for Maui APM821xx SoC and Bluestone board")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211206210223.872249537@linutronix.de
arch/powerpc/platforms/4xx/Makefile
arch/powerpc/platforms/4xx/msi.c [deleted file]
arch/powerpc/sysdev/Kconfig