setup-bus.c (d555a50fd6e0280735cabf8581feff875f3f39d7) setup-bus.c (7779385484dad7c95b624f7c9ee1aa07ab8cf43b)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Support routines for initializing a PCI subsystem
4 *
5 * Extruded from code written by
6 * Dave Rusling (david.rusling@reo.mts.dec.com)
7 * David Mosberger (davidm@cs.arizona.edu)
8 * David Miller (davem@redhat.com)

--- 1872 unchanged lines hidden (view full) ---

1881 mmio_pref_res = &bridge->resource[PCI_BRIDGE_RESOURCES + 2];
1882
1883 /*
1884 * Update additional resource list (add_list) to fill all the
1885 * extra resource space available for this port except the space
1886 * calculated in __pci_bus_size_bridges() which covers all the
1887 * devices currently connected to the port and below.
1888 */
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Support routines for initializing a PCI subsystem
4 *
5 * Extruded from code written by
6 * Dave Rusling (david.rusling@reo.mts.dec.com)
7 * David Mosberger (davidm@cs.arizona.edu)
8 * David Miller (davem@redhat.com)

--- 1872 unchanged lines hidden (view full) ---

1881 mmio_pref_res = &bridge->resource[PCI_BRIDGE_RESOURCES + 2];
1882
1883 /*
1884 * Update additional resource list (add_list) to fill all the
1885 * extra resource space available for this port except the space
1886 * calculated in __pci_bus_size_bridges() which covers all the
1887 * devices currently connected to the port and below.
1888 */
1889 available_io = resource_size(&io);
1890 available_mmio = resource_size(&mmio);
1891 available_mmio_pref = resource_size(&mmio_pref);
1892
1893 extend_bridge_window(bridge, io_res, add_list, available_io);
1894 extend_bridge_window(bridge, mmio_res, add_list, available_mmio);
1889 extend_bridge_window(bridge, io_res, add_list, resource_size(&io));
1890 extend_bridge_window(bridge, mmio_res, add_list, resource_size(&mmio));
1895 extend_bridge_window(bridge, mmio_pref_res, add_list,
1891 extend_bridge_window(bridge, mmio_pref_res, add_list,
1896 available_mmio_pref);
1892 resource_size(&mmio_pref));
1897
1898 /*
1899 * Calculate how many hotplug bridges and normal bridges there
1900 * are on this bus. We will distribute the additional available
1901 * resources between hotplug bridges.
1902 */
1903 for_each_pci_bridge(dev, bus) {
1904 if (dev->is_hotplug_bridge)

--- 19 unchanged lines hidden (view full) ---

1924 return;
1925
1926 /*
1927 * Calculate the total amount of extra resource space we can
1928 * pass to bridges below this one. This is basically the
1929 * extra space reduced by the minimal required space for the
1930 * non-hotplug bridges.
1931 */
1893
1894 /*
1895 * Calculate how many hotplug bridges and normal bridges there
1896 * are on this bus. We will distribute the additional available
1897 * resources between hotplug bridges.
1898 */
1899 for_each_pci_bridge(dev, bus) {
1900 if (dev->is_hotplug_bridge)

--- 19 unchanged lines hidden (view full) ---

1920 return;
1921
1922 /*
1923 * Calculate the total amount of extra resource space we can
1924 * pass to bridges below this one. This is basically the
1925 * extra space reduced by the minimal required space for the
1926 * non-hotplug bridges.
1927 */
1932 remaining_io = available_io;
1933 remaining_mmio = available_mmio;
1934 remaining_mmio_pref = available_mmio_pref;
1928 remaining_io = available_io = resource_size(&io);
1929 remaining_mmio = available_mmio = resource_size(&mmio);
1930 remaining_mmio_pref = available_mmio_pref = resource_size(&mmio_pref);
1935
1936 for_each_pci_bridge(dev, bus) {
1937 const struct resource *res;
1938
1939 if (dev->is_hotplug_bridge)
1940 continue;
1941
1942 /*

--- 271 unchanged lines hidden ---
1931
1932 for_each_pci_bridge(dev, bus) {
1933 const struct resource *res;
1934
1935 if (dev->is_hotplug_bridge)
1936 continue;
1937
1938 /*

--- 271 unchanged lines hidden ---