All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Andrew Lunn <andrew@lunn.ch>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again
Date: Tue, 27 Jun 2017 18:11:43 -0500	[thread overview]
Message-ID: <20170627231143.GI17844@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20170622093855.GA23310@red-moon>

On Thu, Jun 22, 2017 at 10:38:55AM +0100, Lorenzo Pieralisi wrote:
> On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote:
> > We used to pass the operations when calling pci_scan_root_bus, but
> > that argument was removed:
> > 
> > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable]
> > 
> > Setting it in pci_hw should address this.
> 
> No unfortunately it does not. The way I structured the code the
> bridge set-up is carried out in the struct hw_pci.scan() callback and
> for mv78xx0 it was not done properly.
> 
> As said in the other thread we need a pci_fixup_irqs() removal v3 to
> address these issues, given that on some host bridges v2 it is still
> untested.
> 
> Lorenzo
> 
> > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  arch/arm/mach-mv78xx0/pcie.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
> > index 2b406e909a43..cb7f95c9d8eb 100644
> > --- a/arch/arm/mach-mv78xx0/pcie.c
> > +++ b/arch/arm/mach-mv78xx0/pcie.c
> > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot,
> >  }
> >  
> >  static struct hw_pci mv78xx0_pci __initdata = {
> > +	.ops		= &pcie_ops,
> >  	.nr_controllers	= 8,
> >  	.preinit	= mv78xx0_pcie_preinit,
> >  	.setup		= mv78xx0_pcie_setup,

I provisionally made the following change for mv78xx0, based on similar
hunks for dove, iop13xx, and orion5x.

This is on my pci/enumeration branch:

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/enumeration&id=31ddd0eab68e19cf3dfc14321c99ff0b95cda4ad

Please take a look and see if it makes sense.


diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
index 2b406e909a43..f793ebbd7539 100644
--- a/arch/arm/mach-mv78xx0/pcie.c
+++ b/arch/arm/mach-mv78xx0/pcie.c
@@ -201,6 +201,7 @@ static int __init mv78xx0_pcie_scan_bus(int nr, struct pci_host_bridge *bridge)
 		return -EINVAL;
 	}
 
+	bridge->ops = &pcie_ops;
 	return pci_scan_root_bus_bridge(bridge);
 }
 

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again
Date: Tue, 27 Jun 2017 18:11:43 -0500	[thread overview]
Message-ID: <20170627231143.GI17844@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20170622093855.GA23310@red-moon>

On Thu, Jun 22, 2017 at 10:38:55AM +0100, Lorenzo Pieralisi wrote:
> On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote:
> > We used to pass the operations when calling pci_scan_root_bus, but
> > that argument was removed:
> > 
> > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable]
> > 
> > Setting it in pci_hw should address this.
> 
> No unfortunately it does not. The way I structured the code the
> bridge set-up is carried out in the struct hw_pci.scan() callback and
> for mv78xx0 it was not done properly.
> 
> As said in the other thread we need a pci_fixup_irqs() removal v3 to
> address these issues, given that on some host bridges v2 it is still
> untested.
> 
> Lorenzo
> 
> > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  arch/arm/mach-mv78xx0/pcie.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
> > index 2b406e909a43..cb7f95c9d8eb 100644
> > --- a/arch/arm/mach-mv78xx0/pcie.c
> > +++ b/arch/arm/mach-mv78xx0/pcie.c
> > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot,
> >  }
> >  
> >  static struct hw_pci mv78xx0_pci __initdata = {
> > +	.ops		= &pcie_ops,
> >  	.nr_controllers	= 8,
> >  	.preinit	= mv78xx0_pcie_preinit,
> >  	.setup		= mv78xx0_pcie_setup,

I provisionally made the following change for mv78xx0, based on similar
hunks for dove, iop13xx, and orion5x.

This is on my pci/enumeration branch:

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/enumeration&id=31ddd0eab68e19cf3dfc14321c99ff0b95cda4ad

Please take a look and see if it makes sense.


diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
index 2b406e909a43..f793ebbd7539 100644
--- a/arch/arm/mach-mv78xx0/pcie.c
+++ b/arch/arm/mach-mv78xx0/pcie.c
@@ -201,6 +201,7 @@ static int __init mv78xx0_pcie_scan_bus(int nr, struct pci_host_bridge *bridge)
 		return -EINVAL;
 	}
 
+	bridge->ops = &pcie_ops;
 	return pci_scan_root_bus_bridge(bridge);
 }
 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: helgaas@kernel.org (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again
Date: Tue, 27 Jun 2017 18:11:43 -0500	[thread overview]
Message-ID: <20170627231143.GI17844@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20170622093855.GA23310@red-moon>

On Thu, Jun 22, 2017 at 10:38:55AM +0100, Lorenzo Pieralisi wrote:
> On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote:
> > We used to pass the operations when calling pci_scan_root_bus, but
> > that argument was removed:
> > 
> > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable]
> > 
> > Setting it in pci_hw should address this.
> 
> No unfortunately it does not. The way I structured the code the
> bridge set-up is carried out in the struct hw_pci.scan() callback and
> for mv78xx0 it was not done properly.
> 
> As said in the other thread we need a pci_fixup_irqs() removal v3 to
> address these issues, given that on some host bridges v2 it is still
> untested.
> 
> Lorenzo
> 
> > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  arch/arm/mach-mv78xx0/pcie.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
> > index 2b406e909a43..cb7f95c9d8eb 100644
> > --- a/arch/arm/mach-mv78xx0/pcie.c
> > +++ b/arch/arm/mach-mv78xx0/pcie.c
> > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot,
> >  }
> >  
> >  static struct hw_pci mv78xx0_pci __initdata = {
> > +	.ops		= &pcie_ops,
> >  	.nr_controllers	= 8,
> >  	.preinit	= mv78xx0_pcie_preinit,
> >  	.setup		= mv78xx0_pcie_setup,

I provisionally made the following change for mv78xx0, based on similar
hunks for dove, iop13xx, and orion5x.

This is on my pci/enumeration branch:

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/enumeration&id=31ddd0eab68e19cf3dfc14321c99ff0b95cda4ad

Please take a look and see if it makes sense.


diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
index 2b406e909a43..f793ebbd7539 100644
--- a/arch/arm/mach-mv78xx0/pcie.c
+++ b/arch/arm/mach-mv78xx0/pcie.c
@@ -201,6 +201,7 @@ static int __init mv78xx0_pcie_scan_bus(int nr, struct pci_host_bridge *bridge)
 		return -EINVAL;
 	}
 
+	bridge->ops = &pcie_ops;
 	return pci_scan_root_bus_bridge(bridge);
 }
 

  reply	other threads:[~2017-06-27 23:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann
2017-06-21 21:52 ` Arnd Bergmann
2017-06-21 21:52 ` Arnd Bergmann
2017-06-21 21:53 ` [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-22  9:38   ` Lorenzo Pieralisi
2017-06-22  9:38     ` Lorenzo Pieralisi
2017-06-22  9:38     ` Lorenzo Pieralisi
2017-06-27 23:11     ` Bjorn Helgaas [this message]
2017-06-27 23:11       ` Bjorn Helgaas
2017-06-27 23:11       ` Bjorn Helgaas
2017-07-01 13:54       ` Lorenzo Pieralisi
2017-07-01 13:54         ` Lorenzo Pieralisi
2017-07-02 21:12         ` Bjorn Helgaas
2017-07-02 21:12           ` Bjorn Helgaas
2017-07-02 21:12           ` Bjorn Helgaas
2017-06-21 21:53 ` [PATCH 3/4] PCI: versatile: fix typo Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-27 22:49   ` Bjorn Helgaas
2017-06-27 22:49     ` Bjorn Helgaas
2017-06-27 22:49     ` Bjorn Helgaas
2017-06-21 21:53 ` [PATCH 4/4] PCI: versatile: fix another typo Arnd Bergmann
2017-06-21 21:53   ` Arnd Bergmann
2017-06-27 22:52   ` Bjorn Helgaas
2017-06-27 22:52     ` Bjorn Helgaas
2017-06-27 22:52     ` Bjorn Helgaas
2017-06-22  8:47 ` [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Lorenzo Pieralisi
2017-06-22  8:47   ` Lorenzo Pieralisi
2017-06-22  8:47   ` Lorenzo Pieralisi
2017-06-27 22:37 ` Bjorn Helgaas
2017-06-27 22:37   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170627231143.GI17844@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.