RE: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers
From: David Laight
Date: Fri Oct 25 2013 - 05:12:15 EST
> > pcim_enable_msix_min_max(struct pci_dev *dev, struct msix_entry *entries,
> > unsigned int minvec, unsigned int maxvec);
>
> The hardware I have in mind here works only for powers of two.
> Eg. 16, 8, 4, 2, or 1 MSI-X vector. Not the odd values in between.
>
> But it appears I can still just use a loop for that case,
> calling the new function above instead of the old functions.
You'd either have to loop with min and max the same (starting at 16),
or do a single call with min=1 and max=16 and the release the
unwanted ones.
The latter might be preferred because it might stop an annoying
trace about the system not having enough MSI interrupts.
What this doesn't resolve is a driver requesting a lot of interrupts
early on and leaving none for later drivers.
Really the system needs to allocate the minimum number to all
drivers before giving out any extra ones - I've NFI how this
would be arranged!
David
èº{.nÇ+·®+%Ëlzwm
ébëæìr¸zX§»®w¥{ayºÊÚë,j¢f£¢·hàz¹®w¥¢¸¢·¦j:+v¨wèjØm¶ÿ¾«êçzZ+ùÝj"ú!¶iOæ¬z·vØ^¶m§ÿðÃnÆàþY&