PCI: endpoint: Allocate a 64-bit BAR if that is the only option
authorNiklas Cassel <cassel@kernel.org>
Wed, 20 Mar 2024 11:31:49 +0000 (12:31 +0100)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Wed, 10 Apr 2024 18:00:52 +0000 (18:00 +0000)
commit29a025b6fbf36a218d1210061ff889b13e04bc33
tree5955098901caca4ba60ab06b4a3c0f42a7de4ad9
parent417660525d6fb8c34e81f5fa2397370a685e48bc
PCI: endpoint: Allocate a 64-bit BAR if that is the only option

pci_epf_alloc_space() already sets the 64-bit flag if the BAR size is
larger than 2GB, even if the caller did not explicitly request a 64-bit
BAR.

Thus, let pci_epf_alloc_space() also set the 64-bit flag if the hardware
description says that the specific BAR can only be 64-bit.

Link: https://lore.kernel.org/linux-pci/20240320113157.322695-3-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/pci/endpoint/pci-epf-core.c