summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2024-10-12 14:32:42 +0300
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2024-10-12 14:55:54 +0300
commit2314c6ffe8113ac3c22c8112fa9623e30eec6c4a (patch)
treeaa7d7d7f26dd4b31407d58e34810c458427273bf /tools/perf/scripts/python/gecko.py
parentca3c342fb3c76eee739a1cfc4ff59841722ebee7 (diff)
downloadlinux-2314c6ffe8113ac3c22c8112fa9623e30eec6c4a.tar.xz
PCI: endpoint: Improve pci_epc_mem_alloc_addr()
There is no point in attempting to allocate memory from an endpoint controller memory window if the requested size is larger than the memory window size. Add a check to skip bitmap_find_free_region() calls for such case. This check can be done without the mem->lock mutex held as memory window sizes are constant and never modified at runtime. Also change the final return to return NULL to simplify the code. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241012113246.95634-3-dlemoal@kernel.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions