Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull pci fix from Bjorn Helgaas:
"Revert host bridge window patch that fixed HP EliteDesk 805 G6, but
broke ppc:sam460ex (Bjorn Helgaas)"

* tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
Revert "PCI: Coalesce host bridge contiguous apertures"

+4 -46
+4 -46
drivers/pci/probe.c
··· 19 19 #include <linux/hypervisor.h> 20 20 #include <linux/irqdomain.h> 21 21 #include <linux/pm_runtime.h> 22 - #include <linux/list_sort.h> 23 22 #include "pci.h" 24 23 25 24 #define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ ··· 874 875 dev_set_msi_domain(&bus->dev, d); 875 876 } 876 877 877 - static int res_cmp(void *priv, const struct list_head *a, 878 - const struct list_head *b) 879 - { 880 - struct resource_entry *entry1, *entry2; 881 - 882 - entry1 = container_of(a, struct resource_entry, node); 883 - entry2 = container_of(b, struct resource_entry, node); 884 - 885 - if (entry1->res->flags != entry2->res->flags) 886 - return entry1->res->flags > entry2->res->flags; 887 - 888 - if (entry1->offset != entry2->offset) 889 - return entry1->offset > entry2->offset; 890 - 891 - return entry1->res->start > entry2->res->start; 892 - } 893 - 894 878 static int pci_register_host_bridge(struct pci_host_bridge *bridge) 895 879 { 896 880 struct device *parent = bridge->dev.parent; 897 - struct resource_entry *window, *next, *n; 881 + struct resource_entry *window, *n; 898 882 struct pci_bus *bus, *b; 899 - resource_size_t offset, next_offset; 883 + resource_size_t offset; 900 884 LIST_HEAD(resources); 901 - struct resource *res, *next_res; 885 + struct resource *res; 902 886 char addr[64], *fmt; 903 887 const char *name; 904 888 int err; ··· 961 979 if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE) 962 980 dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n"); 963 981 964 - /* Sort and coalesce contiguous windows */ 965 - list_sort(NULL, &resources, res_cmp); 966 - resource_list_for_each_entry_safe(window, n, &resources) { 967 - if (list_is_last(&window->node, &resources)) 968 - break; 969 - 970 - next = list_next_entry(window, node); 971 - offset = window->offset; 972 - res = window->res; 973 - next_offset = next->offset; 974 - next_res = next->res; 975 - 976 - if (res->flags != next_res->flags || offset != next_offset) 977 - continue; 978 - 979 - if (res->end + 1 == next_res->start) { 980 - next_res->start = res->start; 981 - res->flags = res->start = res->end = 0; 982 - } 983 - } 984 - 985 982 /* Add initial resources to the bus */ 986 983 resource_list_for_each_entry_safe(window, n, &resources) { 984 + list_move_tail(&window->node, &bridge->windows); 987 985 offset = window->offset; 988 986 res = window->res; 989 - if (!res->end) 990 - continue; 991 - 992 - list_move_tail(&window->node, &bridge->windows); 993 987 994 988 if (res->flags & IORESOURCE_BUS) 995 989 pci_bus_insert_busn_res(bus, bus->number, res->end);