]> Gentwo Git Trees - linux/.git/commit
PCI: Add pci_rebar_size_supported() helper
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 13 Nov 2025 18:00:47 +0000 (20:00 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 14 Nov 2025 18:34:21 +0000 (12:34 -0600)
commitbb1fabd0d94efc29f88f86fb996c40ac06db3669
treeff7adf2daaef538352d27e8aaab9674a39de8ec6
parentce04b2f9b0b59f2962c4632f3c6abf08601729e7
PCI: Add pci_rebar_size_supported() helper

Many callers of pci_rebar_get_possible_sizes() are interested in finding
out if a particular encoded BAR Size (PCIe r7.0, sec 7.8.6.3) is supported
by the particular BAR.

Add pci_rebar_size_supported() into PCI core to make it easy for the
drivers to determine if the BAR size is supported or not.

Use the new function in pci_resize_resource() and in
pci_iov_vf_bar_set_size().

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patch.msgid.link/20251113180053.27944-6-ilpo.jarvinen@linux.intel.com
drivers/pci/iov.c
drivers/pci/rebar.c
include/linux/pci.h