diff for duplicates of <5AEB033A.4060407@kontron.com> diff --git a/a/1.txt b/N1/1.txt index d23d5de..906262d 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -27,87 +27,80 @@ accesses to every device on these buses. Thanks -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +===================== Gilles BULOZ Senior software engineer Kontron France -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +===================== Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com> ---- linux-4.17-rc1/include/linux/pci.h.orig=092018-04-16 01:24:20.000000000= - +0000 -+++ linux-4.17-rc1/include/linux/pci.h=092018-05-03 09:53:03.270000000 +000= -0 +--- linux-4.17-rc1/include/linux/pci.h.orig 2018-04-16 01:24:20.000000000 +0000 ++++ linux-4.17-rc1/include/linux/pci.h 2018-05-03 09:53:03.270000000 +0000 @@ -217,6 +217,7 @@ enum pci_bus_flags { - =09PCI_BUS_FLAGS_NO_MSI=09=3D (__force pci_bus_flags_t) 1, - =09PCI_BUS_FLAGS_NO_MMRBC=09=3D (__force pci_bus_flags_t) 2, - =09PCI_BUS_FLAGS_NO_AERSID=09=3D (__force pci_bus_flags_t) 4, -+=09PCI_BUS_FLAGS_NO_EXTCFG=09=3D (__force pci_bus_flags_t) 8, + PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, + PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, + PCI_BUS_FLAGS_NO_AERSID = (__force pci_bus_flags_t) 4, ++ PCI_BUS_FLAGS_NO_EXTCFG = (__force pci_bus_flags_t) 8, }; - =20 + /* Values from Link Status register, PCIe r3.1, sec 7.8.8 */ ---- linux-4.17-rc1/drivers/pci/probe.c.orig=092018-05-03 09:45:21.110000000= - +0000 -+++ linux-4.17-rc1/drivers/pci/probe.c=092018-05-03 09:46:50.550000000 +000= -0 +--- linux-4.17-rc1/drivers/pci/probe.c.orig 2018-05-03 09:45:21.110000000 +0000 ++++ linux-4.17-rc1/drivers/pci/probe.c 2018-05-03 09:46:50.550000000 +0000 @@ -882,6 +882,24 @@ free: - =09return err; + return err; } - =20 -+static bool pci_bridge_child_bus_ext_cfg_accessible(struct pci_dev *bridge= -) + ++static bool pci_bridge_child_bus_ext_cfg_accessible(struct pci_dev *bridge) +{ -+=09int pos; -+=09u32 status; ++ int pos; ++ u32 status; + -+=09if (pci_is_pcie(bridge) && -+=09 (pci_pcie_type(bridge) !=3D PCI_EXP_TYPE_PCIE_BRIDGE) && -+=09 (pci_pcie_type(bridge) !=3D PCI_EXP_TYPE_PCI_BRIDGE)) -+=09=09return true; ++ if (pci_is_pcie(bridge) && ++ (pci_pcie_type(bridge) != PCI_EXP_TYPE_PCIE_BRIDGE) && ++ (pci_pcie_type(bridge) != PCI_EXP_TYPE_PCI_BRIDGE)) ++ return true; + -+=09/* PCI/PCI, or PCIe/PCI (forward), or PCI/PCIe (reverse) bridge */ -+=09pos =3D pci_find_capability(bridge, PCI_CAP_ID_PCIX); -+=09if (pos) -+=09=09pci_read_config_dword(bridge, pos + PCI_X_STATUS, &status); ++ /* PCI/PCI, or PCIe/PCI (forward), or PCI/PCIe (reverse) bridge */ ++ pos = pci_find_capability(bridge, PCI_CAP_ID_PCIX); ++ if (pos) ++ pci_read_config_dword(bridge, pos + PCI_X_STATUS, &status); + -+=09return pos && (status & (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ)); ++ return pos && (status & (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ)); +} + static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, - =09=09=09=09=09 struct pci_dev *bridge, int busnr) + struct pci_dev *bridge, int busnr) { @@ -930,6 +948,20 @@ static struct pci_bus *pci_alloc_child_b - =09} - =09bridge->subordinate =3D child; - =20 -+=09/* -+=09 * if bus_flags inherited from parent bus do not already report lack of -+=09 * extended config space support, check if supported by child bus by -+=09 * checking its parent bridge -+=09 */ -+=09if (child->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG) { -+=09=09pci_info(child, "extended config space not accessible due to parent = -bus\n"); -+=09} else { -+=09=09if (!pci_bridge_child_bus_ext_cfg_accessible(bridge)) { -+=09=09=09child->bus_flags |=3D PCI_BUS_FLAGS_NO_EXTCFG; -+=09=09=09pci_info(child, "extended config space not accessible due to pare= -nt bridge\n"); -+=09=09} -+=09} + } + bridge->subordinate = child; + ++ /* ++ * if bus_flags inherited from parent bus do not already report lack of ++ * extended config space support, check if supported by child bus by ++ * checking its parent bridge ++ */ ++ if (child->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG) { ++ pci_info(child, "extended config space not accessible due to parent bus\n"); ++ } else { ++ if (!pci_bridge_child_bus_ext_cfg_accessible(bridge)) { ++ child->bus_flags |= PCI_BUS_FLAGS_NO_EXTCFG; ++ pci_info(child, "extended config space not accessible due to parent bridge\n"); ++ } ++ } + add_dev: - =09pci_set_bus_msi_domain(child); - =09ret =3D device_register(&child->dev); + pci_set_bus_msi_domain(child); + ret = device_register(&child->dev); @@ -1393,6 +1425,9 @@ int pci_cfg_space_size(struct pci_dev *d - =09u32 status; - =09u16 class; - =20 -+=09if (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG) -+=09=09return PCI_CFG_SPACE_SIZE; + u32 status; + u16 class; + ++ if (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG) ++ return PCI_CFG_SPACE_SIZE; + - =09class =3D dev->class >> 8; - =09if (class =3D=3D PCI_CLASS_BRIDGE_HOST) - =09=09return pci_cfg_space_size_ext(dev); + class = dev->class >> 8; + if (class == PCI_CLASS_BRIDGE_HOST) + return pci_cfg_space_size_ext(dev); diff --git a/a/content_digest b/N1/content_digest index 90df6cf..6568427 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -9,15 +9,10 @@ "ref\020180502132501.GE11698@bhelgaas-glaptop.roam.corp.google.com\0" "ref\05AE9C1AB.8020403@kontron.com\0" "ref\020180502172341.GA123831@bhelgaas-glaptop.roam.corp.google.com\0" - "From\0Gilles Buloz <Gilles.Buloz@kontron.com>\0" - "Subject\0Re: LS1043A : \"synchronous abort\" at boot due to PCI config read\0" + "From\0Gilles.Buloz@kontron.com (Gilles Buloz)\0" + "Subject\0LS1043A : \"synchronous abort\" at boot due to PCI config read\0" "Date\0Thu, 3 May 2018 12:40:27 +0000\0" - "To\0Bjorn Helgaas <helgaas@kernel.org>\0" - "Cc\0Bjorn Helgaas <bhelgaas@google.com>" - linux-pci <linux-pci@vger.kernel.org> - Minghuan.Lian@nxp.com <Minghuan.Lian@nxp.com> - linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> - " Ard Biesheuvel <ard.biesheuvel@linaro.org>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Subject: [PATCH] For exception at PCI probe due to bridge reporting UR\n" @@ -49,89 +44,82 @@ "\n" "Thanks\n" "\n" - "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n" + "=====================\n" "Gilles BULOZ\n" "Senior software engineer\n" "Kontron France\n" - "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n" + "=====================\n" "\n" "\n" "Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>\n" "\n" - "--- linux-4.17-rc1/include/linux/pci.h.orig=092018-04-16 01:24:20.000000000=\n" - " +0000\n" - "+++ linux-4.17-rc1/include/linux/pci.h=092018-05-03 09:53:03.270000000 +000=\n" - "0\n" + "--- linux-4.17-rc1/include/linux/pci.h.orig\t2018-04-16 01:24:20.000000000 +0000\n" + "+++ linux-4.17-rc1/include/linux/pci.h\t2018-05-03 09:53:03.270000000 +0000\n" "@@ -217,6 +217,7 @@ enum pci_bus_flags {\n" - " =09PCI_BUS_FLAGS_NO_MSI=09=3D (__force pci_bus_flags_t) 1,\n" - " =09PCI_BUS_FLAGS_NO_MMRBC=09=3D (__force pci_bus_flags_t) 2,\n" - " =09PCI_BUS_FLAGS_NO_AERSID=09=3D (__force pci_bus_flags_t) 4,\n" - "+=09PCI_BUS_FLAGS_NO_EXTCFG=09=3D (__force pci_bus_flags_t) 8,\n" + " \tPCI_BUS_FLAGS_NO_MSI\t= (__force pci_bus_flags_t) 1,\n" + " \tPCI_BUS_FLAGS_NO_MMRBC\t= (__force pci_bus_flags_t) 2,\n" + " \tPCI_BUS_FLAGS_NO_AERSID\t= (__force pci_bus_flags_t) 4,\n" + "+\tPCI_BUS_FLAGS_NO_EXTCFG\t= (__force pci_bus_flags_t) 8,\n" " };\n" - " =20\n" + " \n" " /* Values from Link Status register, PCIe r3.1, sec 7.8.8 */\n" - "--- linux-4.17-rc1/drivers/pci/probe.c.orig=092018-05-03 09:45:21.110000000=\n" - " +0000\n" - "+++ linux-4.17-rc1/drivers/pci/probe.c=092018-05-03 09:46:50.550000000 +000=\n" - "0\n" + "--- linux-4.17-rc1/drivers/pci/probe.c.orig\t2018-05-03 09:45:21.110000000 +0000\n" + "+++ linux-4.17-rc1/drivers/pci/probe.c\t2018-05-03 09:46:50.550000000 +0000\n" "@@ -882,6 +882,24 @@ free:\n" - " =09return err;\n" + " \treturn err;\n" " }\n" - " =20\n" - "+static bool pci_bridge_child_bus_ext_cfg_accessible(struct pci_dev *bridge=\n" - ")\n" + " \n" + "+static bool pci_bridge_child_bus_ext_cfg_accessible(struct pci_dev *bridge)\n" "+{\n" - "+=09int pos;\n" - "+=09u32 status;\n" + "+\tint pos;\n" + "+\tu32 status;\n" "+\n" - "+=09if (pci_is_pcie(bridge) &&\n" - "+=09 (pci_pcie_type(bridge) !=3D PCI_EXP_TYPE_PCIE_BRIDGE) &&\n" - "+=09 (pci_pcie_type(bridge) !=3D PCI_EXP_TYPE_PCI_BRIDGE))\n" - "+=09=09return true;\n" + "+\tif (pci_is_pcie(bridge) &&\n" + "+\t (pci_pcie_type(bridge) != PCI_EXP_TYPE_PCIE_BRIDGE) &&\n" + "+\t (pci_pcie_type(bridge) != PCI_EXP_TYPE_PCI_BRIDGE))\n" + "+\t\treturn true;\n" "+\n" - "+=09/* PCI/PCI, or PCIe/PCI (forward), or PCI/PCIe (reverse) bridge */\n" - "+=09pos =3D pci_find_capability(bridge, PCI_CAP_ID_PCIX);\n" - "+=09if (pos)\n" - "+=09=09pci_read_config_dword(bridge, pos + PCI_X_STATUS, &status);\n" + "+\t/* PCI/PCI, or PCIe/PCI (forward), or PCI/PCIe (reverse) bridge */\n" + "+\tpos = pci_find_capability(bridge, PCI_CAP_ID_PCIX);\n" + "+\tif (pos)\n" + "+\t\tpci_read_config_dword(bridge, pos + PCI_X_STATUS, &status);\n" "+\n" - "+=09return pos && (status & (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ));\n" + "+\treturn pos && (status & (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ));\n" "+}\n" "+\n" " static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,\n" - " =09=09=09=09=09 struct pci_dev *bridge, int busnr)\n" + " \t\t\t\t\t struct pci_dev *bridge, int busnr)\n" " {\n" "@@ -930,6 +948,20 @@ static struct pci_bus *pci_alloc_child_b\n" - " =09}\n" - " =09bridge->subordinate =3D child;\n" - " =20\n" - "+=09/*\n" - "+=09 * if bus_flags inherited from parent bus do not already report lack of\n" - "+=09 * extended config space support, check if supported by child bus by\n" - "+=09 * checking its parent bridge\n" - "+=09 */\n" - "+=09if (child->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG) {\n" - "+=09=09pci_info(child, \"extended config space not accessible due to parent =\n" - "bus\\n\");\n" - "+=09} else {\n" - "+=09=09if (!pci_bridge_child_bus_ext_cfg_accessible(bridge)) {\n" - "+=09=09=09child->bus_flags |=3D PCI_BUS_FLAGS_NO_EXTCFG;\n" - "+=09=09=09pci_info(child, \"extended config space not accessible due to pare=\n" - "nt bridge\\n\");\n" - "+=09=09}\n" - "+=09}\n" + " \t}\n" + " \tbridge->subordinate = child;\n" + " \n" + "+\t/*\n" + "+\t * if bus_flags inherited from parent bus do not already report lack of\n" + "+\t * extended config space support, check if supported by child bus by\n" + "+\t * checking its parent bridge\n" + "+\t */\n" + "+\tif (child->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG) {\n" + "+\t\tpci_info(child, \"extended config space not accessible due to parent bus\\n\");\n" + "+\t} else {\n" + "+\t\tif (!pci_bridge_child_bus_ext_cfg_accessible(bridge)) {\n" + "+\t\t\tchild->bus_flags |= PCI_BUS_FLAGS_NO_EXTCFG;\n" + "+\t\t\tpci_info(child, \"extended config space not accessible due to parent bridge\\n\");\n" + "+\t\t}\n" + "+\t}\n" "+\n" " add_dev:\n" - " =09pci_set_bus_msi_domain(child);\n" - " =09ret =3D device_register(&child->dev);\n" + " \tpci_set_bus_msi_domain(child);\n" + " \tret = device_register(&child->dev);\n" "@@ -1393,6 +1425,9 @@ int pci_cfg_space_size(struct pci_dev *d\n" - " =09u32 status;\n" - " =09u16 class;\n" - " =20\n" - "+=09if (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG)\n" - "+=09=09return PCI_CFG_SPACE_SIZE;\n" + " \tu32 status;\n" + " \tu16 class;\n" + " \n" + "+\tif (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_EXTCFG)\n" + "+\t\treturn PCI_CFG_SPACE_SIZE;\n" "+\n" - " =09class =3D dev->class >> 8;\n" - " =09if (class =3D=3D PCI_CLASS_BRIDGE_HOST)\n" - =09=09return pci_cfg_space_size_ext(dev); + " \tclass = dev->class >> 8;\n" + " \tif (class == PCI_CLASS_BRIDGE_HOST)\n" + " \t\treturn pci_cfg_space_size_ext(dev);" -342b62d21dd507730bfa20f4066fcc85f6d79b13dc5f1ccacc47bdf98acce409 +3d74169b35cfb4fdcb06974db42b9b7316a3c58f7320e61957e02c146106671b
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.