Re: [PATCH RFC v2] platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe

Lukas Wunner
2023-12-15T07:58:08Z

On Thu, Dec 14, 2023 at 06:38:41PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 12, 2023 at 08:47:46PM +0900, Shin'ichiro Kawasaki wrote:
> > +/* Cache BAR0 of P2SB device from function 0 ot 7 */
> > +#define NR_P2SB_RES_CACHE 8
>
> This is fifth or so definition for the same, isn't it a good time to create
> a treewide definition in pci.h?

This isn't something defined in the PCI spec but rather an x86-specific
constant, so should preferrably live somewhere in arch/x86/include/asm/.

If you have a "maximum number of PCI functions per device" constant in mind
then include/uapi/linux/pci.h might be a good fit.

Thanks,

Lukas