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

Michael Ellerman mpe at ellerman.id.au
Tue Dec 7 22:36:02 AEDT 2021


Cédric Le Goater <clg at kaod.org> writes:
> Hello Thomas,
>
> On 12/6/21 23:27, Thomas Gleixner wrote:
>> 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


More information about the Linuxppc-dev mailing list