Skip to contentSkip to conversation

please use pci_alloc_irq_vectors in thunderx_edac.

DISCUSSION Christoph Hellwig 3 participants 6 messages Apr 12, 2017 – Apr 13, 2017

lore
Share & tools
lore
#0 lore raw

Hi Sergey,

you're new thunderx_edac driver uses pci_enable_msix_exact for no good reason. Can you please switch it to use pci_alloc_irq_vectors before it gets merged to mainline?

Thanks,
Christoph

#1 lore raw
Quoted 5 lines · Christoph Hellwig

Hi Sergey,

you're new thunderx_edac driver uses pci_enable_msix_exact for no good reason. Can you please switch it to use pci_alloc_irq_vectors before it gets merged to mainline?

Do we need to mark pci_enable_msix_exact() deprecated or so, or maybe a checkpatch rule?

It says so in some text file in Documentation:

4.3 Legacy APIs

The following old APIs to enable and disable MSI or MSI-X interrupts should not be used in new code:

  pci_enable_msi()              /* deprecated */
  pci_disable_msi()             /* deprecated */
  pci_enable_msix_range()       /* deprecated */
  pci_enable_msix_exact()       /* deprecated */
  pci_disable_msix()            /* deprecated */

but maybe we should enforce it?

Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
#2 lore raw
Quoted 2 lines · Borislav Petkov

Do we need to mark pci_enable_msix_exact() deprecated or so, or maybe a checkpatch rule?

Did we ever do this for deprecated APIs before? For now I'm just watching Linux-next and sending gentle reminders :)

#3 lore raw
Quoted 2 lines · Christoph Hellwig

Did we ever do this for deprecated APIs before? For now I'm just watching Linux-next and sending gentle reminders :)

$ git grep __deprecated

shows some have been done. I wonder whether marking pci_enable_msix_exact() would cause a lot of warnings though. An allyesconfig build would tell...

Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
#4 lore raw
Quoted 9 lines · Borislav Petkov
Quoted 2 lines · Christoph Hellwig

Did we ever do this for deprecated APIs before? For now I'm just watching Linux-next and sending gentle reminders :)

$ git grep __deprecated

shows some have been done. I wonder whether marking pci_enable_msix_exact() would cause a lot of warnings though. An allyesconfig build would tell...

It would cause lots of warnings. The problem with __deprecated is that it causes warnings for existing users, not just new ones.

#5 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines

shows some have been done. I wonder whether marking pci_enable_msix_exact() would cause a lot of warnings though. An allyesconfig build would tell...

It would cause lots of warnings. The problem with __deprecated is that it causes warnings for existing users, not just new ones.

So a checkpatch rule is the way to go, I guess.

Signature · 6 lines
Johannes Thumshirn                                          Storage
[email protected]                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850