Thread (65 messages) 65 messages, 6 authors, 2014-11-21

Re: [RFC PATCH 14/16] arm/PCI: Introduce pci_get_domain_nr()

From: Lorenzo Pieralisi <hidden>
Date: 2014-11-17 12:08:52
Also in: linux-arm-kernel, linux-pci, lkml

On Mon, Nov 17, 2014 at 10:21:48AM +0000, Yijing Wang wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Yijing Wang <redacted>
---
 arch/arm/include/asm/mach/pci.h |    9 +++++++++
 arch/arm/kernel/bios32.c        |    8 ++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
=20
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/=
pci.h
quoted hunk ↗ jump to hunk
index f19f627..370b3bd 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -90,6 +90,15 @@ extern void pci_map_io_early(unsigned long pfn);
 static inline void pci_map_io_early(unsigned long pfn) {}
 #endif
=20
+#ifdef CONFIG_PCI_DOMAINS_GENERIC
+int pci_get_domain_nr(struct device *parent)
+#else
+static inline int pci_get_domain_nr(struct device *parent)
+{
+=09return 0;
+}
+#endif
+
 /*
  * PCI controllers
  */
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index d8c2b4e..3fe56f1 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -513,7 +513,7 @@ static void pcibios_init_hw(struct device *parent, st=
ruct hw_pci *hw,
 #ifdef CONFIG_PCI_DOMAINS_GENERIC
 static bool dt_domain_found;
=20
-void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent=
)
quoted hunk ↗ jump to hunk
+int pci_get_domain_nr(struct device *parent)
 {
 =09int domain =3D of_get_pci_domain_nr(parent->of_node);
=20
@@ -526,8 +526,12 @@ void pci_bus_assign_domain_nr(struct pci_bus *bus, s=
truct device *parent)
 =09} else {
 =09=09domain =3D pci_get_new_domain_nr();
 =09}
+=09return domain;
+}
=20
-=09bus->domain_nr =3D domain;
+void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent=
)
+{
+=09bus->domain_nr =3D pci_get_domain_nr(parent);
 }
 #endif
This code is superseded by the last patches I sent to move the domain
assignment to PCI core code.

http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/301220.=
html

Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help