Files
linux/include/linux
Jerome Brunet 793908d60b PCI: endpoint: Retain fixed-size BAR size as well as aligned size
When allocating space for an endpoint function on a BAR with a fixed size,
the size saved in 'struct pci_epf_bar.size' should be the fixed size as
expected by pci_epc_set_bar().

However, if pci_epf_alloc_space() increased the allocation size to
accommodate iATU alignment requirements, it previously saved the larger
aligned size in .size, which broke pci_epc_set_bar().

To solve this, keep the fixed BAR size in .size and save the aligned size
in a new .aligned_size for use when deallocating it.

Fixes: 2a9a801620 ("PCI: endpoint: Add support to specify alignment for buffers allocated to BARs")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
[mani: commit message fixup]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[bhelgaas: more specific subject, commit log, wrap comment to match file]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Link: https://patch.msgid.link/20250424-pci-ep-size-alignment-v5-1-2d4ec2af23f5@baylibre.com
2025-05-28 16:15:40 -05:00
..
2025-03-21 09:46:08 +01:00
2025-03-06 09:25:06 +01:00
2024-10-11 14:34:11 -04:00
2024-10-13 17:16:57 +02:00
2025-03-21 20:57:55 -03:00
2025-03-13 14:15:54 +00:00
2024-10-14 23:27:57 +05:30
2025-02-21 17:31:45 -06:00
2025-02-21 09:54:01 +01:00
2024-11-11 10:45:03 +01:00
2024-10-14 18:33:04 -07:00
2025-04-02 07:06:59 -06:00
2025-03-08 14:37:39 +01:00
2025-02-26 12:10:48 +01:00
2025-02-06 11:27:16 -07:00
2025-03-20 17:33:31 -04:00
2025-03-17 22:06:41 -07:00
2024-11-05 13:32:21 +01:00
2025-02-24 12:08:51 +02:00
2025-03-20 09:45:39 +01:00
2024-11-28 14:49:28 +01:00
2025-04-05 10:30:17 +02:00
2025-01-07 18:06:51 -08:00
2024-11-24 17:05:27 -08:00
2025-03-10 13:13:04 -07:00
2024-10-16 21:56:59 +02:00
2025-03-22 15:36:49 +02:00
2024-11-05 16:56:26 -08:00
2025-01-14 19:45:35 +01:00
2024-12-13 08:49:31 -07:00
2025-03-08 12:13:25 +01:00
2024-12-09 13:48:23 -08:00
2024-10-14 16:33:24 -05:00
2025-02-20 15:24:13 +01:00
2025-02-07 23:15:01 +05:30
2025-02-07 16:53:04 +01:00
2025-01-15 15:07:23 -08:00
2025-02-10 10:41:00 +01:00
2025-03-17 13:54:50 +00:00
2025-02-18 11:51:22 -05:00
2024-11-05 16:56:26 -08:00
2025-03-06 15:13:13 -04:00
2024-11-16 10:09:30 -06:00
2025-03-27 13:14:46 -05:00
2025-03-27 13:14:45 -05:00
2025-03-10 08:53:40 +01:00
2025-03-12 20:41:14 +01:00
2025-01-10 11:59:00 +01:00
2025-01-07 15:16:48 +01:00
2025-03-16 17:40:22 -07:00
2025-01-02 10:37:14 -06:00
2024-12-09 14:44:59 -08:00
2025-03-17 11:52:25 +01:00
2025-01-29 13:32:23 -08:00
2025-01-29 09:04:28 -08:00
2025-02-28 11:51:26 -08:00
2025-03-20 08:00:50 -07:00
2025-02-28 11:51:26 -08:00
2025-03-25 09:15:07 -07:00
2025-02-12 12:12:27 +01:00
2025-02-28 11:51:26 -08:00
2024-12-09 14:44:59 -08:00
2024-11-06 12:59:44 -05:00
2025-03-13 13:25:58 -07:00
2025-03-13 13:25:58 -07:00
2025-03-13 13:25:58 -07:00