login
Header Space

 
 

Re: 2.6.25-rc5-mm1 sparc64 boot problems due to generic pci_enable_resources()

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <m.kozlowski@...>, <akpm@...>, <linux-kernel@...>, <greg@...>, <sparclinux@...>
Date: Friday, March 28, 2008 - 8:44 pm

On Fri, 2008-03-28 at 16:10 -0700, David Miller wrote:

ppc and x86 won't have problem, I haven't checked the others, sparc64
will as I see things.


Yup, though that makes sense to do it that way on platforms that
actually build a resource tree like x86 or powerpc.


Not that big, but yeah, it should be limited to platforms that actually
build a resource-tree and keep track of assigned & allocated resources,
which sparc64 doesn't (which is fair enough, if your firmware is 100%
right and your kernel never has to assigns things itself). The NULL
parent is a 100% indication that the resource was properly claimed and
put in the resource-tree (and thus is non conflicting) on those
platforms, but it's unused on sparc64.

Basically, on platforms like x86 or powerpc, the PCI subsystem at boot
builds a resource tree by collecting resources for all enabled devices
and bridges in a first pass, then all others in a second pass, checking
for conflicts or unassigned ones, and potentially re-assigning and
re-allocating bridges if necessary.

Sparc64 takes a different approach, it basically doesn't bother with a
full resource tree, and just claims what driver claim, which is fine as
long as you are certain that you always get a perfectly well assigned &
non conflicting setup done by your firmware.

The "full featured" approach is necessary for platforms where this isn't
the case, such as powerpc, even with a pretty good OF like Apple ones,
since they love to not assign resources that they know their MacOS
driver will not need (such as not assigning IO space and closing it on
the P2P bridge) which doesn't necessarily quite work with the
requirements of the linux  drivers, in addition to also gross bugs they
have on some versions when using cards with P2P bridges on them.

In addition, we also need that resource management to be able to
dynamically assign resource after boot as our OF doesn't stay alive to
do it, such as when using cardbus cards, or other type of hotplug things
for which the firmware doesn't do dynamic resource allocation.

So, the meat of the original patch isn't bad per-se. There is definitely
a lot of interest in making a lot of this resource survey and management
code common for platforms who want it (for example, powerpc and x86 are
very close already), and in that regard, this NULL check is definitely
what we want in the "merged" version. But I can understand David
unwillingness in bringing that whole infrastructure on platforms that
don't need it.

A quick survey shows that:

- Use what looks like a full featured resource allocation scheme similar
to x86: alpha, powerpc, ppc, 

- Use what looks like a slightly different scheme that still results in
resources being claimed in the resource tree when valid: ia64, mips (not
100% sure there, but it does call pci_assign_unassigned_resources), 

- Don't build a resource-tree per-se and don't claim device resources
(and thus NULL parent check is unreliable): sparc, sparc64, parisc ?
(unsure but I didn't see code to claim resources in the pci layer), arm
(unsure but PCI here seems to be spread in sub platform code and doesn't
appear to do resource management)

And I stopped there. So we have people on all sides of the fence but it
would still be worth consolidating at least x86, alpha & powerpc, and
possibly bring in others like ia64 and mips.

Cheers,
Ben.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25-rc5-mm1, Andrew Morton, (Tue Mar 11, 4:14 am)
Re: 2.6.25-rc5-mm1 sparc64 boot problems due to generic pci_..., Mariusz Kozlowski, (Fri Mar 28, 6:52 pm)
Re: 2.6.25-rc5-mm1 sparc64 boot problems due to generic pci_..., Benjamin Herrenschmidt, (Fri Mar 28, 8:44 pm)
Re: 2.6.25-rc5-mm1 build failure of pcsp.c, Mariusz Kozlowski, (Sun Mar 16, 5:38 pm)
Re: 2.6.25-rc5-mm1: "consolechars" hangs on boot, Laurent Riffard, (Thu Mar 13, 6:07 pm)
Re: 2.6.25-rc5-mm1: "consolechars" hangs on boot, Andrew Morton, (Thu Mar 13, 6:38 pm)
Re: 2.6.25-rc5-mm1: "consolechars" hangs on boot, Oleg Nesterov, (Fri Mar 14, 1:26 am)
Re: 2.6.25-rc5-mm1: "consolechars" hangs on boot, Laurent Riffard, (Fri Mar 14, 5:06 pm)
Re: 2.6.25-rc5-mm1: "consolechars" hangs on boot, Oleg Nesterov, (Sat Mar 15, 8:03 am)
Re: [2.6.25-rc5-mm1] regression: cannot run Postfix sendmail..., Rafael J. Wysocki, (Thu Mar 20, 6:21 am)
Re: [2.6.25-rc5-mm1] regression: cannot run Postfix sendmail..., Rafael J. Wysocki, (Thu Mar 20, 10:38 am)
Re: 2.6.25-rc5-mm1 shutdown crash, Helge Hafting, (Thu Mar 13, 10:03 am)
Re: 2.6.25-rc5-mm1 shutdown crash, Andrew Morton, (Thu Mar 13, 12:12 pm)
Re: 2.6.25-rc5-mm1 shutdown crash, Helge Hafting, (Tue Mar 25, 8:23 am)
[2.6.25-rc5-mm1] WARNING: at drivers/base/sys.c:173, Tilman Schmidt, (Wed Mar 12, 8:15 pm)
Re: [2.6.25-rc5-mm1] WARNING: at drivers/base/sys.c:173, Tilman Schmidt, (Thu Mar 13, 8:01 pm)
Re: [2.6.25-rc5-mm1] WARNING: at drivers/base/sys.c:173, Tilman Schmidt, (Sat Mar 15, 8:16 am)
Re: [2.6.25-rc5-mm1] WARNING: at drivers/base/sys.c:173, Tilman Schmidt, (Fri Mar 14, 5:58 am)
[2.6.25-rc5-mm1] BUG: spinlock bad magic early during boot, Tilman Schmidt, (Wed Mar 12, 7:54 pm)
Re: 2.6.25-rc5-mm1 - x86_64 boot problem ?, Badari Pulavarty, (Wed Mar 12, 2:10 pm)
Re: 2.6.25-rc5-mm1 - x86_64 boot problem ?, Andrew Morton, (Wed Mar 12, 2:15 pm)
Re: 2.6.25-rc5-mm1 - x86_64 boot problem with git-sched.patch, Badari Pulavarty, (Thu Mar 13, 1:09 pm)
Re: 2.6.25-rc5-mm1 - x86_64 boot problem with git-sched.patch, Badari Pulavarty, (Thu Mar 13, 1:40 pm)
Re: 2.6.25-rc5-mm1 - x86_64 boot problem with git-sched.patch, Guillaume Chazarain, (Thu Mar 13, 1:55 pm)
Re: 2.6.25-rc5-mm1 - x86_64 boot problem with git-sched.patch, Badari Pulavarty, (Thu Mar 13, 2:20 pm)
Re: [BUG] 2.6.25-rc5-mm1 kernel panic with "Exception: 501 "..., Benjamin Herrenschmidt, (Wed Mar 12, 4:40 pm)
Re: 2.6.25-rc5-mm1, Dave Young, (Tue Mar 11, 9:14 pm)
Re: 2.6.25-rc5-mm1, , (Tue Mar 11, 4:23 pm)
Re: 2.6.25-rc5-mm1, Andrew Morton, (Tue Mar 11, 4:39 pm)
Re: 2.6.25-rc5-mm1, Torsten Kaiser, (Wed Mar 12, 3:33 pm)
Re: 2.6.25-rc5-mm1, Andrew Morton, (Wed Mar 12, 3:44 pm)
Re: 2.6.25-rc5-mm1, Torsten Kaiser, (Wed Mar 12, 4:01 pm)
Re: 2.6.25-rc5-mm1, Torsten Kaiser, (Thu Mar 13, 6:05 pm)
Re: 2.6.25-rc5-mm1, Andrew Morton, (Thu Mar 13, 6:35 pm)
Re: 2.6.25-rc5-mm1, Badari Pulavarty, (Thu Mar 13, 7:10 pm)
Re: 2.6.25-rc5-mm1, Ingo Molnar, (Fri Mar 21, 8:12 am)
Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI), Randy Dunlap, (Tue Mar 11, 1:09 pm)
Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI), Jeremy Fitzhardinge, (Tue Mar 11, 2:18 pm)
Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI), Ravikiran G Thirumalai, (Tue Mar 11, 8:10 pm)
Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI), Ingo Molnar, (Wed Mar 12, 3:14 am)
Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI), Jeremy Fitzhardinge, (Tue Mar 11, 9:51 pm)
Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI), Randy Dunlap, (Tue Mar 11, 9:42 pm)
Re: [Build Failure] 2.6.25-rc5-mm1 Build fails with allmodco..., Bartlomiej Zolnierkiewicz..., (Tue Mar 11, 3:36 pm)
Re: [Build Failure] 2.6.25-rc5-mm1 Build fails with allmodco..., Bartlomiej Zolnierkiewicz..., (Tue Mar 11, 3:35 pm)
[Build Faliure] 2.6.25-rc5-mm1 build fails , Kamalesh Babulal, (Tue Mar 11, 6:16 am)
Re: [Build Faliure] 2.6.25-rc5-mm1 build fails, Edward Shishkin, (Tue Mar 11, 6:56 am)
speck-geostationary