* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-04 20:53 ` Jayachandran C
0 siblings, 0 replies; 28+ messages in thread
From: Jayachandran C @ 2015-08-04 20:53 UTC (permalink / raw)
To: Will Deacon, Bjorn Helgaas, linux-pci, linux-arm-kernel,
Arnd Bergmann, Lorenzo Pieralisi, Liviu Dudau
Cc: Jayachandran C, Suravee Suthikulpanit, Ming Lei
The current code in pci-host-generic.c uses pci_common_init_dev()
from arm architecture to do some part of the PCI setup, and this
prevents it from being used with arm64 architecture.
The part of pci_common_init_dev() that is really needed by
pci-host-generic.c is very limited and can be done in the same
file without using hw_pci API of ARM. The ARM platform requires
a pci_sys_data as sysdata for the PCI bus, this can be handled by
setting up gen_pci to have a pci_sys_data variable as the first
element.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Pavel Fedin <p.fedin@samsung.com>
---
Here's v4 of the patchset.
v3-v4
- Changes for comments by Lorenzo Pieralisi/Will Deacon
- add PCI_REASSIGN_ALL_BUS flag if not probe only
- split setup-irq.o into another patch
- minor clean up of commit messages
v2-v3
- rebase to 4.2-rc
- fix PCI_PROBE_ONLY check before calling pcie configure
- added a comment above sysdata
- updated the commit message
v1->v2
- Address comments from Arnd Bergmann and Lorenzo Pieralisi
- move contents of gen_pci_init to gen_pci_probe
- assign resources only when !probe_only
- tested on ARM32 with qemu option -M virt
Notes:
- passing a zeroed out pci_sys_data for ARM looks ok, but I haven't
tested it on ARM.
- tested it on ARM64 fast model
- Any information on how this can be tested on arm is welcome.
- There is only one ifdef, and that can be removed when arm64 gets
a sysdata, or when arm loses its sysdata.
drivers/pci/host/pci-host-generic.c | 55 ++++++++++++++++++++++++-------------
1 file changed, 36 insertions(+), 19 deletions(-)
diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
index ba46e58..53703e3 100644
--- a/drivers/pci/host/pci-host-generic.c
+++ b/drivers/pci/host/pci-host-generic.c
@@ -38,7 +38,15 @@ struct gen_pci_cfg_windows {
const struct gen_pci_cfg_bus_ops *ops;
};
+/*
+ * ARM needs platform specific pci_sys_data as the sysdata for PCI.
+ * We add the sys as the first field below to handle this. sys will
+ * set to 0, so that the pci functions in do the right thing.
+ */
struct gen_pci {
+#ifdef CONFIG_ARM
+ struct pci_sys_data sys;
+#endif
struct pci_host_bridge host;
struct gen_pci_cfg_windows cfg;
struct list_head resources;
@@ -48,8 +56,7 @@ static void __iomem *gen_pci_map_cfg_bus_cam(struct pci_bus *bus,
unsigned int devfn,
int where)
{
- struct pci_sys_data *sys = bus->sysdata;
- struct gen_pci *pci = sys->private_data;
+ struct gen_pci *pci = bus->sysdata;
resource_size_t idx = bus->number - pci->cfg.bus_range->start;
return pci->cfg.win[idx] + ((devfn << 8) | where);
@@ -64,8 +71,7 @@ static void __iomem *gen_pci_map_cfg_bus_ecam(struct pci_bus *bus,
unsigned int devfn,
int where)
{
- struct pci_sys_data *sys = bus->sysdata;
- struct gen_pci *pci = sys->private_data;
+ struct gen_pci *pci = bus->sysdata;
resource_size_t idx = bus->number - pci->cfg.bus_range->start;
return pci->cfg.win[idx] + ((devfn << 12) | where);
@@ -198,13 +204,6 @@ static int gen_pci_parse_map_cfg_windows(struct gen_pci *pci)
return 0;
}
-static int gen_pci_setup(int nr, struct pci_sys_data *sys)
-{
- struct gen_pci *pci = sys->private_data;
- list_splice_init(&pci->resources, &sys->resources);
- return 1;
-}
-
static int gen_pci_probe(struct platform_device *pdev)
{
int err;
@@ -214,13 +213,7 @@ static int gen_pci_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
- struct hw_pci hw = {
- .nr_controllers = 1,
- .private_data = (void **)&pci,
- .setup = gen_pci_setup,
- .map_irq = of_irq_parse_and_map_pci,
- .ops = &gen_pci_ops,
- };
+ struct pci_bus *bus;
if (!pci)
return -ENOMEM;
@@ -258,7 +251,31 @@ static int gen_pci_probe(struct platform_device *pdev)
return err;
}
- pci_common_init_dev(dev, &hw);
+ /* do not reassign resource if probe only */
+ if (!pci_has_flag(PCI_PROBE_ONLY))
+ pci_add_flags(PCI_REASSIGN_ALL_RSRC | PCI_REASSIGN_ALL_BUS);
+
+ bus = pci_scan_root_bus(dev, 0, &gen_pci_ops, pci, &pci->resources);
+ if (!bus) {
+ dev_err(dev, "Scanning rootbus failed");
+ return -ENODEV;
+ }
+
+ pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
+
+ if (!pci_has_flag(PCI_PROBE_ONLY)) {
+ pci_bus_size_bridges(bus);
+ pci_bus_assign_resources(bus);
+ }
+ pci_bus_add_devices(bus);
+
+ /* Configure PCI Express settings */
+ if (!pci_has_flag(PCI_PROBE_ONLY)) {
+ struct pci_bus *child;
+
+ list_for_each_entry(child, &bus->children, node)
+ pcie_bus_configure_settings(child);
+ }
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-04 20:53 ` Jayachandran C
0 siblings, 0 replies; 28+ messages in thread
From: Jayachandran C @ 2015-08-04 20:53 UTC (permalink / raw)
To: linux-arm-kernel
The current code in pci-host-generic.c uses pci_common_init_dev()
from arm architecture to do some part of the PCI setup, and this
prevents it from being used with arm64 architecture.
The part of pci_common_init_dev() that is really needed by
pci-host-generic.c is very limited and can be done in the same
file without using hw_pci API of ARM. The ARM platform requires
a pci_sys_data as sysdata for the PCI bus, this can be handled by
setting up gen_pci to have a pci_sys_data variable as the first
element.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Pavel Fedin <p.fedin@samsung.com>
---
Here's v4 of the patchset.
v3-v4
- Changes for comments by Lorenzo Pieralisi/Will Deacon
- add PCI_REASSIGN_ALL_BUS flag if not probe only
- split setup-irq.o into another patch
- minor clean up of commit messages
v2-v3
- rebase to 4.2-rc
- fix PCI_PROBE_ONLY check before calling pcie configure
- added a comment above sysdata
- updated the commit message
v1->v2
- Address comments from Arnd Bergmann and Lorenzo Pieralisi
- move contents of gen_pci_init to gen_pci_probe
- assign resources only when !probe_only
- tested on ARM32 with qemu option -M virt
Notes:
- passing a zeroed out pci_sys_data for ARM looks ok, but I haven't
tested it on ARM.
- tested it on ARM64 fast model
- Any information on how this can be tested on arm is welcome.
- There is only one ifdef, and that can be removed when arm64 gets
a sysdata, or when arm loses its sysdata.
drivers/pci/host/pci-host-generic.c | 55 ++++++++++++++++++++++++-------------
1 file changed, 36 insertions(+), 19 deletions(-)
diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
index ba46e58..53703e3 100644
--- a/drivers/pci/host/pci-host-generic.c
+++ b/drivers/pci/host/pci-host-generic.c
@@ -38,7 +38,15 @@ struct gen_pci_cfg_windows {
const struct gen_pci_cfg_bus_ops *ops;
};
+/*
+ * ARM needs platform specific pci_sys_data as the sysdata for PCI.
+ * We add the sys as the first field below to handle this. sys will
+ * set to 0, so that the pci functions in do the right thing.
+ */
struct gen_pci {
+#ifdef CONFIG_ARM
+ struct pci_sys_data sys;
+#endif
struct pci_host_bridge host;
struct gen_pci_cfg_windows cfg;
struct list_head resources;
@@ -48,8 +56,7 @@ static void __iomem *gen_pci_map_cfg_bus_cam(struct pci_bus *bus,
unsigned int devfn,
int where)
{
- struct pci_sys_data *sys = bus->sysdata;
- struct gen_pci *pci = sys->private_data;
+ struct gen_pci *pci = bus->sysdata;
resource_size_t idx = bus->number - pci->cfg.bus_range->start;
return pci->cfg.win[idx] + ((devfn << 8) | where);
@@ -64,8 +71,7 @@ static void __iomem *gen_pci_map_cfg_bus_ecam(struct pci_bus *bus,
unsigned int devfn,
int where)
{
- struct pci_sys_data *sys = bus->sysdata;
- struct gen_pci *pci = sys->private_data;
+ struct gen_pci *pci = bus->sysdata;
resource_size_t idx = bus->number - pci->cfg.bus_range->start;
return pci->cfg.win[idx] + ((devfn << 12) | where);
@@ -198,13 +204,6 @@ static int gen_pci_parse_map_cfg_windows(struct gen_pci *pci)
return 0;
}
-static int gen_pci_setup(int nr, struct pci_sys_data *sys)
-{
- struct gen_pci *pci = sys->private_data;
- list_splice_init(&pci->resources, &sys->resources);
- return 1;
-}
-
static int gen_pci_probe(struct platform_device *pdev)
{
int err;
@@ -214,13 +213,7 @@ static int gen_pci_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
- struct hw_pci hw = {
- .nr_controllers = 1,
- .private_data = (void **)&pci,
- .setup = gen_pci_setup,
- .map_irq = of_irq_parse_and_map_pci,
- .ops = &gen_pci_ops,
- };
+ struct pci_bus *bus;
if (!pci)
return -ENOMEM;
@@ -258,7 +251,31 @@ static int gen_pci_probe(struct platform_device *pdev)
return err;
}
- pci_common_init_dev(dev, &hw);
+ /* do not reassign resource if probe only */
+ if (!pci_has_flag(PCI_PROBE_ONLY))
+ pci_add_flags(PCI_REASSIGN_ALL_RSRC | PCI_REASSIGN_ALL_BUS);
+
+ bus = pci_scan_root_bus(dev, 0, &gen_pci_ops, pci, &pci->resources);
+ if (!bus) {
+ dev_err(dev, "Scanning rootbus failed");
+ return -ENODEV;
+ }
+
+ pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
+
+ if (!pci_has_flag(PCI_PROBE_ONLY)) {
+ pci_bus_size_bridges(bus);
+ pci_bus_assign_resources(bus);
+ }
+ pci_bus_add_devices(bus);
+
+ /* Configure PCI Express settings */
+ if (!pci_has_flag(PCI_PROBE_ONLY)) {
+ struct pci_bus *child;
+
+ list_for_each_entry(child, &bus->children, node)
+ pcie_bus_configure_settings(child);
+ }
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 2/3] PCI: Add setup-irq.o when compiling for arm64
2015-08-04 20:53 ` Jayachandran C
@ 2015-08-04 20:53 ` Jayachandran C
-1 siblings, 0 replies; 28+ messages in thread
From: Jayachandran C @ 2015-08-04 20:53 UTC (permalink / raw)
To: Will Deacon, Bjorn Helgaas, linux-pci, linux-arm-kernel,
Arnd Bergmann, Lorenzo Pieralisi, Liviu Dudau
Cc: Jayachandran C, Suravee Suthikulpanit, Ming Lei
ARM64 requires setup-irq.o to provide pci_fixup_irqs() implementation.
We are adding this now to support the pci-host-generic host controller,
but we enable it for ARM64 PCI so that other host controllers can use
this as well.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
drivers/pci/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 73e4af4..be3f631 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_PCI_IOV) += iov.o
#
obj-$(CONFIG_ALPHA) += setup-irq.o
obj-$(CONFIG_ARM) += setup-irq.o
+obj-$(CONFIG_ARM64) += setup-irq.o
obj-$(CONFIG_UNICORE32) += setup-irq.o
obj-$(CONFIG_SUPERH) += setup-irq.o
obj-$(CONFIG_MIPS) += setup-irq.o
--
1.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 2/3] PCI: Add setup-irq.o when compiling for arm64
@ 2015-08-04 20:53 ` Jayachandran C
0 siblings, 0 replies; 28+ messages in thread
From: Jayachandran C @ 2015-08-04 20:53 UTC (permalink / raw)
To: linux-arm-kernel
ARM64 requires setup-irq.o to provide pci_fixup_irqs() implementation.
We are adding this now to support the pci-host-generic host controller,
but we enable it for ARM64 PCI so that other host controllers can use
this as well.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
drivers/pci/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 73e4af4..be3f631 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_PCI_IOV) += iov.o
#
obj-$(CONFIG_ALPHA) += setup-irq.o
obj-$(CONFIG_ARM) += setup-irq.o
+obj-$(CONFIG_ARM64) += setup-irq.o
obj-$(CONFIG_UNICORE32) += setup-irq.o
obj-$(CONFIG_SUPERH) += setup-irq.o
obj-$(CONFIG_MIPS) += setup-irq.o
--
1.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 3/3] PCI: generic: add arm64 support
2015-08-04 20:53 ` Jayachandran C
@ 2015-08-04 20:53 ` Jayachandran C
-1 siblings, 0 replies; 28+ messages in thread
From: Jayachandran C @ 2015-08-04 20:53 UTC (permalink / raw)
To: Will Deacon, Bjorn Helgaas, linux-pci, linux-arm-kernel,
Arnd Bergmann, Lorenzo Pieralisi, Liviu Dudau
Cc: Jayachandran C, Suravee Suthikulpanit, Ming Lei
Make pci-host-generic driver (kernel option PCI_HOST_GENERIC) available
on arm64.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
drivers/pci/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index c132bdd..675c2d1 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -53,7 +53,7 @@ config PCI_RCAR_GEN2_PCIE
config PCI_HOST_GENERIC
bool "Generic PCI host controller"
- depends on ARM && OF
+ depends on (ARM || ARM64) && OF
help
Say Y here if you want to support a simple generic PCI host
controller, such as the one emulated by kvmtool.
--
1.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 3/3] PCI: generic: add arm64 support
@ 2015-08-04 20:53 ` Jayachandran C
0 siblings, 0 replies; 28+ messages in thread
From: Jayachandran C @ 2015-08-04 20:53 UTC (permalink / raw)
To: linux-arm-kernel
Make pci-host-generic driver (kernel option PCI_HOST_GENERIC) available
on arm64.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
drivers/pci/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index c132bdd..675c2d1 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -53,7 +53,7 @@ config PCI_RCAR_GEN2_PCIE
config PCI_HOST_GENERIC
bool "Generic PCI host controller"
- depends on ARM && OF
+ depends on (ARM || ARM64) && OF
help
Say Y here if you want to support a simple generic PCI host
controller, such as the one emulated by kvmtool.
--
1.9.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-04 20:53 ` Jayachandran C
@ 2015-08-04 23:49 ` Bjorn Helgaas
-1 siblings, 0 replies; 28+ messages in thread
From: Bjorn Helgaas @ 2015-08-04 23:49 UTC (permalink / raw)
To: Jayachandran C
Cc: Will Deacon, linux-pci, linux-arm-kernel, Arnd Bergmann,
Lorenzo Pieralisi, Liviu Dudau, Suravee Suthikulpanit, Ming Lei
On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
> The current code in pci-host-generic.c uses pci_common_init_dev()
> from arm architecture to do some part of the PCI setup, and this
> prevents it from being used with arm64 architecture.
>
> The part of pci_common_init_dev() that is really needed by
> pci-host-generic.c is very limited and can be done in the same
> file without using hw_pci API of ARM. The ARM platform requires
> a pci_sys_data as sysdata for the PCI bus, this can be handled by
> setting up gen_pci to have a pci_sys_data variable as the first
> element.
>
> Signed-off-by: Jayachandran C <jchandra@broadcom.com>
> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Pavel Fedin <p.fedin@samsung.com>
I applied all three of these to my pci/enumeration branch for v4.3.
I made a few changes, the most important being to call
pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
touch devices after drivers claim them.
I dropped the acks and tested-by because of that change, but I'll happily
add them back if Lorenzo and Pavel confirm. The patches are here if you
want to review/test them:
https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
I'm sure the other patches on that branch will need some tweaks, too, so I
don't have any problem with updating these.
Bjorn
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-04 23:49 ` Bjorn Helgaas
0 siblings, 0 replies; 28+ messages in thread
From: Bjorn Helgaas @ 2015-08-04 23:49 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
> The current code in pci-host-generic.c uses pci_common_init_dev()
> from arm architecture to do some part of the PCI setup, and this
> prevents it from being used with arm64 architecture.
>
> The part of pci_common_init_dev() that is really needed by
> pci-host-generic.c is very limited and can be done in the same
> file without using hw_pci API of ARM. The ARM platform requires
> a pci_sys_data as sysdata for the PCI bus, this can be handled by
> setting up gen_pci to have a pci_sys_data variable as the first
> element.
>
> Signed-off-by: Jayachandran C <jchandra@broadcom.com>
> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Tested-by: Pavel Fedin <p.fedin@samsung.com>
I applied all three of these to my pci/enumeration branch for v4.3.
I made a few changes, the most important being to call
pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
touch devices after drivers claim them.
I dropped the acks and tested-by because of that change, but I'll happily
add them back if Lorenzo and Pavel confirm. The patches are here if you
want to review/test them:
https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
I'm sure the other patches on that branch will need some tweaks, too, so I
don't have any problem with updating these.
Bjorn
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-04 23:49 ` Bjorn Helgaas
@ 2015-08-05 9:23 ` Will Deacon
-1 siblings, 0 replies; 28+ messages in thread
From: Will Deacon @ 2015-08-05 9:23 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Jayachandran C, linux-pci, linux-arm-kernel, Arnd Bergmann,
Lorenzo Pieralisi, Liviu Dudau, suravee.suthikulpanit, Ming Lei
On Wed, Aug 05, 2015 at 12:49:56AM +0100, Bjorn Helgaas wrote:
> On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
> > The current code in pci-host-generic.c uses pci_common_init_dev()
> > from arm architecture to do some part of the PCI setup, and this
> > prevents it from being used with arm64 architecture.
> >
> > The part of pci_common_init_dev() that is really needed by
> > pci-host-generic.c is very limited and can be done in the same
> > file without using hw_pci API of ARM. The ARM platform requires
> > a pci_sys_data as sysdata for the PCI bus, this can be handled by
> > setting up gen_pci to have a pci_sys_data variable as the first
> > element.
> >
> > Signed-off-by: Jayachandran C <jchandra@broadcom.com>
> > Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Pavel Fedin <p.fedin@samsung.com>
>
> I applied all three of these to my pci/enumeration branch for v4.3.
>
> I made a few changes, the most important being to call
> pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
> may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
> touch devices after drivers claim them.
>
> I dropped the acks and tested-by because of that change, but I'll happily
> add them back if Lorenzo and Pavel confirm. The patches are here if you
> want to review/test them:
>
> https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
>
> I'm sure the other patches on that branch will need some tweaks, too, so I
> don't have any problem with updating these.
Excellent, thanks Bjorn! Marc and I will take these for a spin in
conjunction with tip/irq/core and the arm64 queue.
That said, I just tried to build this and it fails to compile the x-gene
PCI host driver. Fixup below.
Will
--->8
diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 514f41b86c49..57ac0c7108a8 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -506,7 +506,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
{
struct device_node *msi_node;
- msi_node = of_parse_phandle(port->dev.of_node, "msi-parent", 0);
+ msi_node = of_parse_phandle(port->dev->of_node, "msi-parent", 0);
if (!msi_node)
return -ENODEV;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-05 9:23 ` Will Deacon
0 siblings, 0 replies; 28+ messages in thread
From: Will Deacon @ 2015-08-05 9:23 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 05, 2015 at 12:49:56AM +0100, Bjorn Helgaas wrote:
> On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
> > The current code in pci-host-generic.c uses pci_common_init_dev()
> > from arm architecture to do some part of the PCI setup, and this
> > prevents it from being used with arm64 architecture.
> >
> > The part of pci_common_init_dev() that is really needed by
> > pci-host-generic.c is very limited and can be done in the same
> > file without using hw_pci API of ARM. The ARM platform requires
> > a pci_sys_data as sysdata for the PCI bus, this can be handled by
> > setting up gen_pci to have a pci_sys_data variable as the first
> > element.
> >
> > Signed-off-by: Jayachandran C <jchandra@broadcom.com>
> > Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Pavel Fedin <p.fedin@samsung.com>
>
> I applied all three of these to my pci/enumeration branch for v4.3.
>
> I made a few changes, the most important being to call
> pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
> may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
> touch devices after drivers claim them.
>
> I dropped the acks and tested-by because of that change, but I'll happily
> add them back if Lorenzo and Pavel confirm. The patches are here if you
> want to review/test them:
>
> https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
>
> I'm sure the other patches on that branch will need some tweaks, too, so I
> don't have any problem with updating these.
Excellent, thanks Bjorn! Marc and I will take these for a spin in
conjunction with tip/irq/core and the arm64 queue.
That said, I just tried to build this and it fails to compile the x-gene
PCI host driver. Fixup below.
Will
--->8
diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 514f41b86c49..57ac0c7108a8 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -506,7 +506,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
{
struct device_node *msi_node;
- msi_node = of_parse_phandle(port->dev.of_node, "msi-parent", 0);
+ msi_node = of_parse_phandle(port->dev->of_node, "msi-parent", 0);
if (!msi_node)
return -ENODEV;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-05 9:23 ` Will Deacon
@ 2015-08-05 9:25 ` Will Deacon
-1 siblings, 0 replies; 28+ messages in thread
From: Will Deacon @ 2015-08-05 9:25 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Jayachandran C, linux-pci, linux-arm-kernel, Arnd Bergmann,
Lorenzo Pieralisi, Liviu Dudau, suravee.suthikulpanit, Ming Lei
On Wed, Aug 05, 2015 at 10:23:18AM +0100, Will Deacon wrote:
> That said, I just tried to build this and it fails to compile the x-gene
> PCI host driver. Fixup below.
Wait, there's more!
Will
--->8
diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 514f41b86c49..8ab3bd098424 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -506,7 +506,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
{
struct device_node *msi_node;
- msi_node = of_parse_phandle(port->dev.of_node, "msi-parent", 0);
+ msi_node = of_parse_phandle(port->dev->of_node, "msi-parent", 0);
if (!msi_node)
return -ENODEV;
@@ -515,7 +515,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
return -ENODEV;
of_node_put(msi_node);
- port->msi->dev = &port->dev;
+ port->msi->dev = port->dev;
return 0;
}
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-05 9:25 ` Will Deacon
0 siblings, 0 replies; 28+ messages in thread
From: Will Deacon @ 2015-08-05 9:25 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 05, 2015 at 10:23:18AM +0100, Will Deacon wrote:
> That said, I just tried to build this and it fails to compile the x-gene
> PCI host driver. Fixup below.
Wait, there's more!
Will
--->8
diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 514f41b86c49..8ab3bd098424 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -506,7 +506,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
{
struct device_node *msi_node;
- msi_node = of_parse_phandle(port->dev.of_node, "msi-parent", 0);
+ msi_node = of_parse_phandle(port->dev->of_node, "msi-parent", 0);
if (!msi_node)
return -ENODEV;
@@ -515,7 +515,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
return -ENODEV;
of_node_put(msi_node);
- port->msi->dev = &port->dev;
+ port->msi->dev = port->dev;
return 0;
}
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-05 9:25 ` Will Deacon
@ 2015-08-05 11:51 ` Bjorn Helgaas
-1 siblings, 0 replies; 28+ messages in thread
From: Bjorn Helgaas @ 2015-08-05 11:51 UTC (permalink / raw)
To: Will Deacon
Cc: Jayachandran C, linux-pci, linux-arm-kernel, Arnd Bergmann,
Lorenzo Pieralisi, Liviu Dudau, suravee.suthikulpanit, Ming Lei
On Wed, Aug 5, 2015 at 4:25 AM, Will Deacon <will.deacon@arm.com> wrote:
> On Wed, Aug 05, 2015 at 10:23:18AM +0100, Will Deacon wrote:
>> That said, I just tried to build this and it fails to compile the x-gene
>> PCI host driver. Fixup below.
>
> Wait, there's more!
Thanks! I fixed these two and updated pci/enumeration. But the 0-day
build also found this:
commit: cc44fbb49d995ad2348d530300abf7877105094f [4/13] ARM/PCI,
designware, xilinx: Use pci_scan_root_bus_msi()
drivers/built-in.o: In function `dw_msi_setup_irq':
>> :(.text+0x2a3c8): undefined reference to `pci_write_msi_msg'
I don't see the problem there yet, and I'm going on vacation until
Monday, so I won't be able to do anything with this until then.
Bjorn
> diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
> index 514f41b86c49..8ab3bd098424 100644
> --- a/drivers/pci/host/pci-xgene.c
> +++ b/drivers/pci/host/pci-xgene.c
> @@ -506,7 +506,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
> {
> struct device_node *msi_node;
>
> - msi_node = of_parse_phandle(port->dev.of_node, "msi-parent", 0);
> + msi_node = of_parse_phandle(port->dev->of_node, "msi-parent", 0);
> if (!msi_node)
> return -ENODEV;
>
> @@ -515,7 +515,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
> return -ENODEV;
>
> of_node_put(msi_node);
> - port->msi->dev = &port->dev;
> + port->msi->dev = port->dev;
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-05 11:51 ` Bjorn Helgaas
0 siblings, 0 replies; 28+ messages in thread
From: Bjorn Helgaas @ 2015-08-05 11:51 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 5, 2015 at 4:25 AM, Will Deacon <will.deacon@arm.com> wrote:
> On Wed, Aug 05, 2015 at 10:23:18AM +0100, Will Deacon wrote:
>> That said, I just tried to build this and it fails to compile the x-gene
>> PCI host driver. Fixup below.
>
> Wait, there's more!
Thanks! I fixed these two and updated pci/enumeration. But the 0-day
build also found this:
commit: cc44fbb49d995ad2348d530300abf7877105094f [4/13] ARM/PCI,
designware, xilinx: Use pci_scan_root_bus_msi()
drivers/built-in.o: In function `dw_msi_setup_irq':
>> :(.text+0x2a3c8): undefined reference to `pci_write_msi_msg'
I don't see the problem there yet, and I'm going on vacation until
Monday, so I won't be able to do anything with this until then.
Bjorn
> diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
> index 514f41b86c49..8ab3bd098424 100644
> --- a/drivers/pci/host/pci-xgene.c
> +++ b/drivers/pci/host/pci-xgene.c
> @@ -506,7 +506,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
> {
> struct device_node *msi_node;
>
> - msi_node = of_parse_phandle(port->dev.of_node, "msi-parent", 0);
> + msi_node = of_parse_phandle(port->dev->of_node, "msi-parent", 0);
> if (!msi_node)
> return -ENODEV;
>
> @@ -515,7 +515,7 @@ static int xgene_pcie_msi_enable(struct xgene_pcie_port *port)
> return -ENODEV;
>
> of_node_put(msi_node);
> - port->msi->dev = &port->dev;
> + port->msi->dev = port->dev;
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-04 23:49 ` Bjorn Helgaas
@ 2015-08-12 7:11 ` Pavel Fedin
-1 siblings, 0 replies; 28+ messages in thread
From: Pavel Fedin @ 2015-08-12 7:11 UTC (permalink / raw)
To: 'Bjorn Helgaas', 'Jayachandran C'
Cc: 'Will Deacon',
linux-pci, linux-arm-kernel, 'Arnd Bergmann',
'Lorenzo Pieralisi', 'Liviu Dudau',
'Suravee Suthikulpanit', 'Ming Lei'
Hello!
> I dropped the acks and tested-by because of that change, but I'll happily
> add them back if Lorenzo and Pavel confirm.
Confirm.
Tested-by: Pavel Fedin <p.fedin@samsung.com>
I also added MSI support. Can i post it as patch on top of your branch?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-12 7:11 ` Pavel Fedin
0 siblings, 0 replies; 28+ messages in thread
From: Pavel Fedin @ 2015-08-12 7:11 UTC (permalink / raw)
To: linux-arm-kernel
Hello!
> I dropped the acks and tested-by because of that change, but I'll happily
> add them back if Lorenzo and Pavel confirm.
Confirm.
Tested-by: Pavel Fedin <p.fedin@samsung.com>
I also added MSI support. Can i post it as patch on top of your branch?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-12 7:11 ` Pavel Fedin
@ 2015-08-12 9:04 ` Will Deacon
-1 siblings, 0 replies; 28+ messages in thread
From: Will Deacon @ 2015-08-12 9:04 UTC (permalink / raw)
To: Pavel Fedin
Cc: 'Bjorn Helgaas', 'Jayachandran C',
linux-pci, linux-arm-kernel, 'Arnd Bergmann',
Lorenzo Pieralisi, Liviu Dudau, suravee.suthikulpanit,
'Ming Lei',
marc.zyngier
On Wed, Aug 12, 2015 at 08:11:29AM +0100, Pavel Fedin wrote:
> Hello!
Hi Pavel,
> > I dropped the acks and tested-by because of that change, but I'll happily
> > add them back if Lorenzo and Pavel confirm.
>
> Confirm.
> Tested-by: Pavel Fedin <p.fedin@samsung.com>
>
> I also added MSI support. Can i post it as patch on top of your branch?
There shouldn't be any need with the changes queued in tip/irq/core. Can
you give the following branch a go, please (it doesn't look like Bjorn's
stuff is in linux-next, unfortunately)?
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel
It's a temporary testing branch (subject to rebasing), but it should be
indicative of what's queued for 4.3.
Will
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-12 9:04 ` Will Deacon
0 siblings, 0 replies; 28+ messages in thread
From: Will Deacon @ 2015-08-12 9:04 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 12, 2015 at 08:11:29AM +0100, Pavel Fedin wrote:
> Hello!
Hi Pavel,
> > I dropped the acks and tested-by because of that change, but I'll happily
> > add them back if Lorenzo and Pavel confirm.
>
> Confirm.
> Tested-by: Pavel Fedin <p.fedin@samsung.com>
>
> I also added MSI support. Can i post it as patch on top of your branch?
There shouldn't be any need with the changes queued in tip/irq/core. Can
you give the following branch a go, please (it doesn't look like Bjorn's
stuff is in linux-next, unfortunately)?
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel
It's a temporary testing branch (subject to rebasing), but it should be
indicative of what's queued for 4.3.
Will
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-04 23:49 ` Bjorn Helgaas
@ 2015-08-12 9:15 ` Lorenzo Pieralisi
-1 siblings, 0 replies; 28+ messages in thread
From: Lorenzo Pieralisi @ 2015-08-12 9:15 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Jayachandran C, Will Deacon, linux-pci, linux-arm-kernel,
Arnd Bergmann, Liviu Dudau, suravee.suthikulpanit, Ming Lei
On Wed, Aug 05, 2015 at 12:49:56AM +0100, Bjorn Helgaas wrote:
> On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
> > The current code in pci-host-generic.c uses pci_common_init_dev()
> > from arm architecture to do some part of the PCI setup, and this
> > prevents it from being used with arm64 architecture.
> >
> > The part of pci_common_init_dev() that is really needed by
> > pci-host-generic.c is very limited and can be done in the same
> > file without using hw_pci API of ARM. The ARM platform requires
> > a pci_sys_data as sysdata for the PCI bus, this can be handled by
> > setting up gen_pci to have a pci_sys_data variable as the first
> > element.
> >
> > Signed-off-by: Jayachandran C <jchandra@broadcom.com>
> > Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Pavel Fedin <p.fedin@samsung.com>
>
> I applied all three of these to my pci/enumeration branch for v4.3.
>
> I made a few changes, the most important being to call
> pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
> may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
> touch devices after drivers claim them.
>
> I dropped the acks and tested-by because of that change, but I'll happily
> add them back if Lorenzo and Pavel confirm. The patches are here if you
> want to review/test them:
>
> https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
>
I am happy with your changes so you can certainly add my acked-by/tested-by
tags back, with thanks.
Thank you !
Lorenzo
> I'm sure the other patches on that branch will need some tweaks, too, so I
> don't have any problem with updating these.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-12 9:15 ` Lorenzo Pieralisi
0 siblings, 0 replies; 28+ messages in thread
From: Lorenzo Pieralisi @ 2015-08-12 9:15 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 05, 2015 at 12:49:56AM +0100, Bjorn Helgaas wrote:
> On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
> > The current code in pci-host-generic.c uses pci_common_init_dev()
> > from arm architecture to do some part of the PCI setup, and this
> > prevents it from being used with arm64 architecture.
> >
> > The part of pci_common_init_dev() that is really needed by
> > pci-host-generic.c is very limited and can be done in the same
> > file without using hw_pci API of ARM. The ARM platform requires
> > a pci_sys_data as sysdata for the PCI bus, this can be handled by
> > setting up gen_pci to have a pci_sys_data variable as the first
> > element.
> >
> > Signed-off-by: Jayachandran C <jchandra@broadcom.com>
> > Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Tested-by: Pavel Fedin <p.fedin@samsung.com>
>
> I applied all three of these to my pci/enumeration branch for v4.3.
>
> I made a few changes, the most important being to call
> pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
> may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
> touch devices after drivers claim them.
>
> I dropped the acks and tested-by because of that change, but I'll happily
> add them back if Lorenzo and Pavel confirm. The patches are here if you
> want to review/test them:
>
> https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
>
I am happy with your changes so you can certainly add my acked-by/tested-by
tags back, with thanks.
Thank you !
Lorenzo
> I'm sure the other patches on that branch will need some tweaks, too, so I
> don't have any problem with updating these.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-05 9:23 ` Will Deacon
@ 2015-08-13 13:16 ` Suravee Suthikulpanit
-1 siblings, 0 replies; 28+ messages in thread
From: Suravee Suthikulpanit @ 2015-08-13 13:16 UTC (permalink / raw)
To: Will Deacon, Bjorn Helgaas
Cc: Jayachandran C, linux-pci, linux-arm-kernel, Arnd Bergmann,
Lorenzo Pieralisi, Liviu Dudau, Ming Lei
Hi Bjorn,
On 8/5/15 16:23, Will Deacon wrote:
> On Wed, Aug 05, 2015 at 12:49:56AM +0100, Bjorn Helgaas wrote:
>> >On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
>>> > >The current code in pci-host-generic.c uses pci_common_init_dev()
>>> > >from arm architecture to do some part of the PCI setup, and this
>>> > >prevents it from being used with arm64 architecture.
>>> > >
>>> > >The part of pci_common_init_dev() that is really needed by
>>> > >pci-host-generic.c is very limited and can be done in the same
>>> > >file without using hw_pci API of ARM. The ARM platform requires
>>> > >a pci_sys_data as sysdata for the PCI bus, this can be handled by
>>> > >setting up gen_pci to have a pci_sys_data variable as the first
>>> > >element.
>>> > >
>>> > >Signed-off-by: Jayachandran C<jchandra@broadcom.com>
>>> > >Acked-by: Lorenzo Pieralisi<lorenzo.pieralisi@arm.com>
>>> > >Tested-by: Lorenzo Pieralisi<lorenzo.pieralisi@arm.com>
>>> > >Tested-by: Pavel Fedin<p.fedin@samsung.com>
>> >
>> >I applied all three of these to my pci/enumeration branch for v4.3.
>> >
>> >I made a few changes, the most important being to call
>> >pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
>> >may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
>> >touch devices after drivers claim them.
>> >
>> >I dropped the acks and tested-by because of that change, but I'll happily
>> >add them back if Lorenzo and Pavel confirm. The patches are here if you
>> >want to review/test them:
>> >
>> >https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
>> >
>> >I'm sure the other patches on that branch will need some tweaks, too, so I
>> >don't have any problem with updating these.
I have also tested on AMD Seattle (w/ non-PROBE_ONLY mode).
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-13 13:16 ` Suravee Suthikulpanit
0 siblings, 0 replies; 28+ messages in thread
From: Suravee Suthikulpanit @ 2015-08-13 13:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi Bjorn,
On 8/5/15 16:23, Will Deacon wrote:
> On Wed, Aug 05, 2015 at 12:49:56AM +0100, Bjorn Helgaas wrote:
>> >On Wed, Aug 05, 2015 at 02:23:38AM +0530, Jayachandran C wrote:
>>> > >The current code in pci-host-generic.c uses pci_common_init_dev()
>>> > >from arm architecture to do some part of the PCI setup, and this
>>> > >prevents it from being used with arm64 architecture.
>>> > >
>>> > >The part of pci_common_init_dev() that is really needed by
>>> > >pci-host-generic.c is very limited and can be done in the same
>>> > >file without using hw_pci API of ARM. The ARM platform requires
>>> > >a pci_sys_data as sysdata for the PCI bus, this can be handled by
>>> > >setting up gen_pci to have a pci_sys_data variable as the first
>>> > >element.
>>> > >
>>> > >Signed-off-by: Jayachandran C<jchandra@broadcom.com>
>>> > >Acked-by: Lorenzo Pieralisi<lorenzo.pieralisi@arm.com>
>>> > >Tested-by: Lorenzo Pieralisi<lorenzo.pieralisi@arm.com>
>>> > >Tested-by: Pavel Fedin<p.fedin@samsung.com>
>> >
>> >I applied all three of these to my pci/enumeration branch for v4.3.
>> >
>> >I made a few changes, the most important being to call
>> >pcie_bus_configure_settings() before pci_bus_add_devices(), because drivers
>> >may claim devices in pci_bus_add_devices(), and the PCI core shouldn't
>> >touch devices after drivers claim them.
>> >
>> >I dropped the acks and tested-by because of that change, but I'll happily
>> >add them back if Lorenzo and Pavel confirm. The patches are here if you
>> >want to review/test them:
>> >
>> >https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/enumeration
>> >
>> >I'm sure the other patches on that branch will need some tweaks, too, so I
>> >don't have any problem with updating these.
I have also tested on AMD Seattle (w/ non-PROBE_ONLY mode).
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-12 9:04 ` Will Deacon
@ 2015-08-14 13:44 ` Pavel Fedin
-1 siblings, 0 replies; 28+ messages in thread
From: Pavel Fedin @ 2015-08-14 13:44 UTC (permalink / raw)
To: 'Will Deacon'
Cc: 'Bjorn Helgaas', 'Jayachandran C',
linux-pci, linux-arm-kernel, 'Arnd Bergmann',
'Lorenzo Pieralisi', 'Liviu Dudau',
suravee.suthikulpanit, 'Ming Lei',
marc.zyngier
Hello!
> > I also added MSI support. Can i post it as patch on top of your branch?
>
> There shouldn't be any need with the changes queued in tip/irq/core. Can
> you give the following branch a go, please (it doesn't look like Bjorn's
> stuff is in linux-next, unfortunately)?
>
> git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel
I have checked, they already implemented generic handling for "msi-parent" property in the device
tree, and MSI works out of the box.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-14 13:44 ` Pavel Fedin
0 siblings, 0 replies; 28+ messages in thread
From: Pavel Fedin @ 2015-08-14 13:44 UTC (permalink / raw)
To: linux-arm-kernel
Hello!
> > I also added MSI support. Can i post it as patch on top of your branch?
>
> There shouldn't be any need with the changes queued in tip/irq/core. Can
> you give the following branch a go, please (it doesn't look like Bjorn's
> stuff is in linux-next, unfortunately)?
>
> git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel
I have checked, they already implemented generic handling for "msi-parent" property in the device
tree, and MSI works out of the box.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-12 9:04 ` Will Deacon
@ 2015-08-14 14:46 ` Bjorn Helgaas
-1 siblings, 0 replies; 28+ messages in thread
From: Bjorn Helgaas @ 2015-08-14 14:46 UTC (permalink / raw)
To: Will Deacon
Cc: Pavel Fedin, 'Jayachandran C',
linux-pci, linux-arm-kernel, 'Arnd Bergmann',
Lorenzo Pieralisi, Liviu Dudau, suravee.suthikulpanit,
'Ming Lei',
marc.zyngier
On Wed, Aug 12, 2015 at 10:04:50AM +0100, Will Deacon wrote:
> On Wed, Aug 12, 2015 at 08:11:29AM +0100, Pavel Fedin wrote:
> > > I dropped the acks and tested-by because of that change, but I'll happily
> > > add them back if Lorenzo and Pavel confirm.
> >
> > Confirm.
> > Tested-by: Pavel Fedin <p.fedin@samsung.com>
> >
> > I also added MSI support. Can i post it as patch on top of your branch?
>
> There shouldn't be any need with the changes queued in tip/irq/core. Can
> you give the following branch a go, please (it doesn't look like Bjorn's
> stuff is in linux-next, unfortunately)?
We still have a build issue (undefined reference to pci_write_msi_msg
in imx_v6_v7_defconfig) to resolve before putting it in linux-next.
Hopefully we can resolve that today.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-14 14:46 ` Bjorn Helgaas
0 siblings, 0 replies; 28+ messages in thread
From: Bjorn Helgaas @ 2015-08-14 14:46 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 12, 2015 at 10:04:50AM +0100, Will Deacon wrote:
> On Wed, Aug 12, 2015 at 08:11:29AM +0100, Pavel Fedin wrote:
> > > I dropped the acks and tested-by because of that change, but I'll happily
> > > add them back if Lorenzo and Pavel confirm.
> >
> > Confirm.
> > Tested-by: Pavel Fedin <p.fedin@samsung.com>
> >
> > I also added MSI support. Can i post it as patch on top of your branch?
>
> There shouldn't be any need with the changes queued in tip/irq/core. Can
> you give the following branch a go, please (it doesn't look like Bjorn's
> stuff is in linux-next, unfortunately)?
We still have a build issue (undefined reference to pci_write_msi_msg
in imx_v6_v7_defconfig) to resolve before putting it in linux-next.
Hopefully we can resolve that today.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
2015-08-14 14:46 ` Bjorn Helgaas
@ 2015-08-14 15:24 ` Lorenzo Pieralisi
-1 siblings, 0 replies; 28+ messages in thread
From: Lorenzo Pieralisi @ 2015-08-14 15:24 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Will Deacon, Pavel Fedin, 'Jayachandran C',
linux-pci, linux-arm-kernel, 'Arnd Bergmann',
Liviu Dudau, suravee.suthikulpanit, 'Ming Lei',
Marc Zyngier
Hi Bjorn,
On Fri, Aug 14, 2015 at 03:46:44PM +0100, Bjorn Helgaas wrote:
> On Wed, Aug 12, 2015 at 10:04:50AM +0100, Will Deacon wrote:
> > On Wed, Aug 12, 2015 at 08:11:29AM +0100, Pavel Fedin wrote:
> > > > I dropped the acks and tested-by because of that change, but I'll happily
> > > > add them back if Lorenzo and Pavel confirm.
> > >
> > > Confirm.
> > > Tested-by: Pavel Fedin <p.fedin@samsung.com>
> > >
> > > I also added MSI support. Can i post it as patch on top of your branch?
> >
> > There shouldn't be any need with the changes queued in tip/irq/core. Can
> > you give the following branch a go, please (it doesn't look like Bjorn's
> > stuff is in linux-next, unfortunately)?
>
> We still have a build issue (undefined reference to pci_write_msi_msg
> in imx_v6_v7_defconfig) to resolve before putting it in linux-next.
> Hopefully we can resolve that today.
I have sent you a fix for that, please let me know if that's ok with
you or you want me to rework it.
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci
@ 2015-08-14 15:24 ` Lorenzo Pieralisi
0 siblings, 0 replies; 28+ messages in thread
From: Lorenzo Pieralisi @ 2015-08-14 15:24 UTC (permalink / raw)
To: linux-arm-kernel
Hi Bjorn,
On Fri, Aug 14, 2015 at 03:46:44PM +0100, Bjorn Helgaas wrote:
> On Wed, Aug 12, 2015 at 10:04:50AM +0100, Will Deacon wrote:
> > On Wed, Aug 12, 2015 at 08:11:29AM +0100, Pavel Fedin wrote:
> > > > I dropped the acks and tested-by because of that change, but I'll happily
> > > > add them back if Lorenzo and Pavel confirm.
> > >
> > > Confirm.
> > > Tested-by: Pavel Fedin <p.fedin@samsung.com>
> > >
> > > I also added MSI support. Can i post it as patch on top of your branch?
> >
> > There shouldn't be any need with the changes queued in tip/irq/core. Can
> > you give the following branch a go, please (it doesn't look like Bjorn's
> > stuff is in linux-next, unfortunately)?
>
> We still have a build issue (undefined reference to pci_write_msi_msg
> in imx_v6_v7_defconfig) to resolve before putting it in linux-next.
> Hopefully we can resolve that today.
I have sent you a fix for that, please let me know if that's ok with
you or you want me to rework it.
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2015-08-14 15:24 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 20:53 [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci Jayachandran C
2015-08-04 20:53 ` Jayachandran C
2015-08-04 20:53 ` [PATCH v4 2/3] PCI: Add setup-irq.o when compiling for arm64 Jayachandran C
2015-08-04 20:53 ` Jayachandran C
2015-08-04 20:53 ` [PATCH v4 3/3] PCI: generic: add arm64 support Jayachandran C
2015-08-04 20:53 ` Jayachandran C
2015-08-04 23:49 ` [PATCH v4 1/3] PCI: generic: remove dependency on hw_pci Bjorn Helgaas
2015-08-04 23:49 ` Bjorn Helgaas
2015-08-05 9:23 ` Will Deacon
2015-08-05 9:23 ` Will Deacon
2015-08-05 9:25 ` Will Deacon
2015-08-05 9:25 ` Will Deacon
2015-08-05 11:51 ` Bjorn Helgaas
2015-08-05 11:51 ` Bjorn Helgaas
2015-08-13 13:16 ` Suravee Suthikulpanit
2015-08-13 13:16 ` Suravee Suthikulpanit
2015-08-12 7:11 ` Pavel Fedin
2015-08-12 7:11 ` Pavel Fedin
2015-08-12 9:04 ` Will Deacon
2015-08-12 9:04 ` Will Deacon
2015-08-14 13:44 ` Pavel Fedin
2015-08-14 13:44 ` Pavel Fedin
2015-08-14 14:46 ` Bjorn Helgaas
2015-08-14 14:46 ` Bjorn Helgaas
2015-08-14 15:24 ` Lorenzo Pieralisi
2015-08-14 15:24 ` Lorenzo Pieralisi
2015-08-12 9:15 ` Lorenzo Pieralisi
2015-08-12 9:15 ` Lorenzo Pieralisi
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.