diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-08-29 16:11:09 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2025-09-16 11:19:55 -0500 |
commit | 4292a1e45fd464551efac7b2b52fd3606e956c28 (patch) | |
tree | 73376261fb33816962f76b6cdf6e221d0e7d261c /scripts/gdb/linux/interrupts.py | |
parent | ae88d0b9c57f70086dca4f8ccb14c64b2f144c58 (diff) |
PCI: Refactor distributing available memory to use loops
pci_bus_distribute_available_resources() and
pci_bridge_distribute_available_resources() retain bridge window resources
and related data needed for distributing the available window in
independent variables for io, memory, and prefetchable memory windows. The
code is essentially the same for all of them and therefore repeated three
times with different variable names.
Refactor pci_bus_distribute_available_resources() to take an array. This
is complicated slightly by the function taking advantage of passing the
struct as value, which cannot be done for arrays in C. Therefore, copy the
data into a local array in the stack in the first loop.
Variable names are (hopefully) improved slightly as well.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250829131113.36754-21-ilpo.jarvinen@linux.intel.com
Diffstat (limited to 'scripts/gdb/linux/interrupts.py')
0 files changed, 0 insertions, 0 deletions