* [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error
@ 2020-10-19 6:14 Randy Dunlap
2020-10-20 8:02 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2020-10-19 6:14 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, Thomas Bogendoerfer,
Paul Burton, linux-mips, Bjorn Helgaas, linux-pci
Fix a build error in drivers/mfd/ioc.o by exporting
pci_find_host_bridge().
ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined!
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
---
drivers/pci/host-bridge.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-next-20201016.orig/drivers/pci/host-bridge.c
+++ linux-next-20201016/drivers/pci/host-bridge.c
@@ -4,6 +4,7 @@
*/
#include <linux/kernel.h>
+#include <linux/export.h>
#include <linux/pci.h>
#include <linux/module.h>
@@ -23,6 +24,7 @@ struct pci_host_bridge *pci_find_host_br
return to_pci_host_bridge(root_bus->bridge);
}
+EXPORT_SYMBOL(pci_find_host_bridge);
struct device *pci_get_host_bridge_device(struct pci_dev *dev)
{
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error
2020-10-19 6:14 [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error Randy Dunlap
@ 2020-10-20 8:02 ` Christoph Hellwig
2020-10-20 14:06 ` Randy Dunlap
2020-10-21 10:08 ` Thomas Bogendoerfer
0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2020-10-20 8:02 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, kernel test robot, Thomas Bogendoerfer,
Paul Burton, linux-mips, Bjorn Helgaas, linux-pci
On Sun, Oct 18, 2020 at 11:14:53PM -0700, Randy Dunlap wrote:
> Fix a build error in drivers/mfd/ioc.o by exporting
> pci_find_host_bridge().
>
> ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined!
I think the mfd code should be fixed to not depend on such an internal
symbol instead.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error
2020-10-20 8:02 ` Christoph Hellwig
@ 2020-10-20 14:06 ` Randy Dunlap
2020-10-20 15:51 ` Randy Dunlap
2020-10-21 10:08 ` Thomas Bogendoerfer
1 sibling, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2020-10-20 14:06 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-kernel, kernel test robot, Thomas Bogendoerfer,
Paul Burton, linux-mips, Bjorn Helgaas, linux-pci, Lee Jones,
Thomas Bogendoerfer
On 10/20/20 1:02 AM, Christoph Hellwig wrote:
> On Sun, Oct 18, 2020 at 11:14:53PM -0700, Randy Dunlap wrote:
>> Fix a build error in drivers/mfd/ioc.o by exporting
>> pci_find_host_bridge().
>>
>> ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined!
>
> I think the mfd code should be fixed to not depend on such an internal
> symbol instead.
>
Thanks for commenting. and I am not surprised.
Adding Cc: for Thomas and Lee.
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error
2020-10-20 14:06 ` Randy Dunlap
@ 2020-10-20 15:51 ` Randy Dunlap
2020-10-20 16:04 ` Randy Dunlap
0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2020-10-20 15:51 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-kernel, kernel test robot, Thomas Bogendoerfer,
Paul Burton, linux-mips, Bjorn Helgaas, linux-pci, Lee Jones,
Thomas Bogendoerfer
On 10/20/20 7:06 AM, Randy Dunlap wrote:
> On 10/20/20 1:02 AM, Christoph Hellwig wrote:
>> On Sun, Oct 18, 2020 at 11:14:53PM -0700, Randy Dunlap wrote:
>>> Fix a build error in drivers/mfd/ioc.o by exporting
>>> pci_find_host_bridge().
>>>
>>> ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined!
>>
>> I think the mfd code should be fixed to not depend on such an internal
>> symbol instead.
>>
>
> Thanks for commenting. and I am not surprised.
>
> Adding Cc: for Thomas and Lee.
BTW, if someone wants to use the MFD ioc3 driver now,
without any source code patches, they can just build it in
(SGI_MFD_IOC3=y) instead of building it as a loadable module.
It builds successfully and can use pci_find_host_bridge().
pci_find_host_bridge() just isn't exported for loadable modules.
So this could be useful (PCI=y):
config SGI_MFD_IOC3
tristate "SGI IOC3 core driver"
depends on PCI=y && MIPS && 64BIT
select MFD_CORE
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error
2020-10-20 15:51 ` Randy Dunlap
@ 2020-10-20 16:04 ` Randy Dunlap
0 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2020-10-20 16:04 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-kernel, kernel test robot, Thomas Bogendoerfer,
Paul Burton, linux-mips, Bjorn Helgaas, linux-pci, Lee Jones,
Thomas Bogendoerfer
On 10/20/20 8:51 AM, Randy Dunlap wrote:
> On 10/20/20 7:06 AM, Randy Dunlap wrote:
>> On 10/20/20 1:02 AM, Christoph Hellwig wrote:
>>> On Sun, Oct 18, 2020 at 11:14:53PM -0700, Randy Dunlap wrote:
>>>> Fix a build error in drivers/mfd/ioc.o by exporting
>>>> pci_find_host_bridge().
>>>>
>>>> ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined!
>>>
>>> I think the mfd code should be fixed to not depend on such an internal
>>> symbol instead.
>>>
>>
>> Thanks for commenting. and I am not surprised.
>>
>> Adding Cc: for Thomas and Lee.
>
> BTW, if someone wants to use the MFD ioc3 driver now,
> without any source code patches, they can just build it in
> (SGI_MFD_IOC3=y) instead of building it as a loadable module.
>
> It builds successfully and can use pci_find_host_bridge().
> pci_find_host_bridge() just isn't exported for loadable modules.
>
> So this could be useful (PCI=y):
>
> config SGI_MFD_IOC3
> tristate "SGI IOC3 core driver"
> depends on PCI=y && MIPS && 64BIT
> select MFD_CORE
Wow. That's not correct at all. Need more coffee.
Just set SGI_MFD_IOC3=y and it will be fine.
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error
2020-10-20 8:02 ` Christoph Hellwig
2020-10-20 14:06 ` Randy Dunlap
@ 2020-10-21 10:08 ` Thomas Bogendoerfer
2020-10-23 6:47 ` Christoph Hellwig
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Bogendoerfer @ 2020-10-21 10:08 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Randy Dunlap, linux-kernel, kernel test robot, Paul Burton,
linux-mips, Bjorn Helgaas, linux-pci
On Tue, Oct 20, 2020 at 09:02:19AM +0100, Christoph Hellwig wrote:
> On Sun, Oct 18, 2020 at 11:14:53PM -0700, Randy Dunlap wrote:
> > Fix a build error in drivers/mfd/ioc.o by exporting
> > pci_find_host_bridge().
> >
> > ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined!
>
> I think the mfd code should be fixed to not depend on such an internal
> symbol instead.
are you talking about the EXPORT_SYMBOL or the usage of
pci_find_host_bridge() outside of drivers/pci ? If the latter the
function is used in arm/arm64 code and pci controller code... so
I doesn't look like a pure internal symbol to me.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error
2020-10-21 10:08 ` Thomas Bogendoerfer
@ 2020-10-23 6:47 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2020-10-23 6:47 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: Christoph Hellwig, Randy Dunlap, linux-kernel, kernel test robot,
Paul Burton, linux-mips, Bjorn Helgaas, linux-pci
On Wed, Oct 21, 2020 at 12:08:45PM +0200, Thomas Bogendoerfer wrote:
> On Tue, Oct 20, 2020 at 09:02:19AM +0100, Christoph Hellwig wrote:
> > On Sun, Oct 18, 2020 at 11:14:53PM -0700, Randy Dunlap wrote:
> > > Fix a build error in drivers/mfd/ioc.o by exporting
> > > pci_find_host_bridge().
> > >
> > > ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined!
> >
> > I think the mfd code should be fixed to not depend on such an internal
> > symbol instead.
>
> are you talking about the EXPORT_SYMBOL or the usage of
> pci_find_host_bridge() outside of drivers/pci ? If the latter the
> function is used in arm/arm64 code and pci controller code... so
> I doesn't look like a pure internal symbol to me.
All of those are built-in and related bits aren't exported at all, or
at best EXPORT_SYMBOL_GPL. I think just not allowing the ioc3 mfd to
be built modular might be the easiest fix here. Especially as for IP27
and co kernel it is everything but optional anyway.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-10-23 6:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 6:14 [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error Randy Dunlap
2020-10-20 8:02 ` Christoph Hellwig
2020-10-20 14:06 ` Randy Dunlap
2020-10-20 15:51 ` Randy Dunlap
2020-10-20 16:04 ` Randy Dunlap
2020-10-21 10:08 ` Thomas Bogendoerfer
2020-10-23 6:47 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).