2005-05-25 02:41:46

by Marty Leisner

[permalink] [raw]
Subject: CONFIG_HOTPLUG, 2.4.x and ppc


I'm dealing with a custom BRIDGE_OTHER chip, which has PCI devices
on the other side...the configuration cycles don't follow a standard, and
I'm trying to establish the bus behind the bridge when I install a module...
essentially I'm doing things similar to hotplug drivers...

I have no experience with hotplug drivers, but it appears to be incompatible
with the ppc architure...

Calling pci_do_scan_bus, it calls pcibios_fixup_bus.

In the 2.4 ppc kernels, pcibios_fixup_bus is defined to be:
void __init pcibios_fixup_bus(struct pci_bus *bus)

On intel, its defined to be:
void __devinit pcibios_fixup_bus(struct pci_bus *bus)


Since pci_do_scan_bus needs CONFIG_HOTPLUG, this path is exercised,
and pcibios_fixup_bus isn't present on ppc after bootup...

This patch is necessary if we CONFIG_HOTPLUG on ppc...there seems
to be no reason why not -- others changes like this might be necessary...


:1 mleisner@santa 04:28:16; rcsdiff -r1.1 -u arch/ppc/kernel/pci.c
===================================================================
RCS file: arch/ppc/kernel/pci.c,v
retrieving revision 1.1
diff -u -r1.1 arch/ppc/kernel/pci.c
--- arch/ppc/kernel/pci.c 2005/05/18 19:08:09 1.1
+++ arch/ppc/kernel/pci.c 2005/05/24 19:23:33
@@ -1384,7 +1384,7 @@
return start;
}

-void __init pcibios_fixup_bus(struct pci_bus *bus)
+void __devinit pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
unsigned long io_offset;


The patch is wrt to 2.4.20, but 2.4.30 appears to have the same problem...




Marty Leisner
[email protected]



2005-05-25 04:19:35

by Greg KH

[permalink] [raw]
Subject: Re: CONFIG_HOTPLUG, 2.4.x and ppc

On Tue, May 24, 2005 at 10:41:18PM -0400, Marty Leisner wrote:
>
> I'm dealing with a custom BRIDGE_OTHER chip, which has PCI devices
> on the other side...the configuration cycles don't follow a standard, and
> I'm trying to establish the bus behind the bridge when I install a module...
> essentially I'm doing things similar to hotplug drivers...
>
> I have no experience with hotplug drivers, but it appears to be incompatible
> with the ppc architure...

What pci hotplug controller works on the ppc platform on the 2.4 kernel?

thanks,

greg k-h

2005-05-25 05:23:25

by Marty Leisner

[permalink] [raw]
Subject: Re: CONFIG_HOTPLUG, 2.4.x and ppc

Its a custom chip with bridge functionality...(its not hotplug,
but the thought was "if hotplug can add a bridge at a later time,
so can an arbitrary module". There's a number of minor problems
in how BRIDGE_OTHER is handled (i.e. the first two bars should
be filled in like any other bridge, but everything else ignored).

The goal is to add a PCI bus behind the bridge (the bios
and the kernel doesn't know about it).

So I'm executing the sequence to add a new bus -- which
needs CONFIG_HOTPLUG to export the symbols -- which causes the
problem with PPC in the arch dependent part (it works fine
on intel platforms).

Looking at the hotplug drivers, it looks like its tied to
intel architectures in places...but adding a PCI bus should be
a PCI thing...

Marty Leisner


Greg KH <[email protected]> writes on Tue, 24 May 2005 21:26:21 PDT
> On Tue, May 24, 2005 at 10:41:18PM -0400, Marty Leisner wrote:
> >
> > I'm dealing with a custom BRIDGE_OTHER chip, which has PCI devices
> > on the other side...the configuration cycles don't follow a standard, and
> > I'm trying to establish the bus behind the bridge when I install a module...
> > essentially I'm doing things similar to hotplug drivers...
> >
> > I have no experience with hotplug drivers, but it appears to be incompatible
> > with the ppc architure...
>
> What pci hotplug controller works on the ppc platform on the 2.4 kernel?
>
> thanks,
>
> greg k-h

2005-05-26 22:06:11

by Greg KH

[permalink] [raw]
Subject: Re: CONFIG_HOTPLUG, 2.4.x and ppc

On Wed, May 25, 2005 at 01:23:04AM -0400, Marty Leisner wrote:
> Its a custom chip with bridge functionality...(its not hotplug,
> but the thought was "if hotplug can add a bridge at a later time,
> so can an arbitrary module". There's a number of minor problems
> in how BRIDGE_OTHER is handled (i.e. the first two bars should
> be filled in like any other bridge, but everything else ignored).
>
> The goal is to add a PCI bus behind the bridge (the bios
> and the kernel doesn't know about it).
>
> So I'm executing the sequence to add a new bus -- which
> needs CONFIG_HOTPLUG to export the symbols -- which causes the
> problem with PPC in the arch dependent part (it works fine
> on intel platforms).
>
> Looking at the hotplug drivers, it looks like its tied to
> intel architectures in places...but adding a PCI bus should be
> a PCI thing...

Yes it should be a pci thing, but for 2.4, a lot of the codepaths have
not been checked to see that they are all proper for a non-intel based
system. Your finding is one such proof :)

thanks,

greg k-h