* [PATCH 14/16] Resource assignments for PCI devices on Celleb
@ 2006-11-15 9:58 Ishizaki Kou
2006-11-15 23:56 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Ishizaki Kou @ 2006-11-15 9:58 UTC (permalink / raw)
To: linuxppc-dev
Celleb has multiple PCI buses. Devices on some of those PCI buses require to
assign resources by Linux.
This patch is for such buses not to claim resources, because claimed resource
does not become a target for resource assign.
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
---
Index: linux-2.6.19/arch/powerpc/kernel/pci_64.c
diff -u linux-2.6.19/arch/powerpc/kernel/pci_64.c:1.1.1.2 linux-2.6.19/arch/powerpc/kernel/pci_64.c:1.3
--- linux-2.6.19/arch/powerpc/kernel/pci_64.c:1.1.1.2 Tue Oct 24 13:35:53 2006
+++ linux-2.6.19/arch/powerpc/kernel/pci_64.c Mon Nov 6 22:04:23 2006
@@ -247,8 +247,16 @@
if (firmware_has_feature(FW_FEATURE_ISERIES))
return;
+#ifdef CONFIG_PPC_MULTIPLATFORM
+ list_for_each_entry(b, &pci_root_buses, node) {
+ if (!machine_is(celleb) ||
+ ppc_md.pci_probe_mode(b) == PCI_PROBE_DEVTREE)
+ pcibios_claim_one_bus(b);
+ }
+#else
list_for_each_entry(b, &pci_root_buses, node)
pcibios_claim_one_bus(b);
+#endif
}
#ifdef CONFIG_PPC_MULTIPLATFORM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 14/16] Resource assignments for PCI devices on Celleb
2006-11-15 9:58 Ishizaki Kou
@ 2006-11-15 23:56 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-11-15 23:56 UTC (permalink / raw)
To: Ishizaki Kou; +Cc: linuxppc-dev
On Wed, 2006-11-15 at 18:58 +0900, Ishizaki Kou wrote:
> Celleb has multiple PCI buses. Devices on some of those PCI buses require to
> assign resources by Linux.
> This patch is for such buses not to claim resources, because claimed resource
> does not become a target for resource assign.
I do not fully understand why you need that. You should be able to let
the PCI code claim all resources wether they are on real PCI or not.
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 14/16] Resource assignments for PCI devices on Celleb
@ 2006-11-17 10:14 Ishizaki Kou
2006-11-17 22:14 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Ishizaki Kou @ 2006-11-17 10:14 UTC (permalink / raw)
To: linuxppc-dev
Hi Ben-san,
>On Wed, 2006-11-15 at 18:58 +0900, Ishizaki Kou wrote:
>> Celleb has multiple PCI buses. Devices on some of those PCI buses require to
>> assign resources by Linux.
>> This patch is for such buses not to claim resources, because claimed resource
>> does not become a target for resource assign.
>
>I do not fully understand why you need that. You should be able to let
>the PCI code claim all resources wether they are on real PCI or not.
This is a temporary workaround for following problem.
On Celleb, values of PCI base addresses of PCI devices which are not
described in device tree are not initialized before linux starts. So
we use pci_bus_assign_resources() later to assign resources for them
at ppc_md.pcibios_fixup(). But by original code, when
ppc_md.pcibios_fixup() is called, resources are already claimed and
pci_bus_assign_resource() does not work to assign resources.
It may not be a good idea to call pci_bus_assign_resources() at the
timing of ppc_md.pcibios_fixup(), but we did not find an alternative
idea.
Thank you,
Kou Ishizaki
Toshiba
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 14/16] Resource assignments for PCI devices on Celleb
2006-11-17 10:14 [PATCH 14/16] Resource assignments for PCI devices on Celleb Ishizaki Kou
@ 2006-11-17 22:14 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-11-17 22:14 UTC (permalink / raw)
To: Ishizaki Kou; +Cc: linuxppc-dev
\
> This is a temporary workaround for following problem.
>
> On Celleb, values of PCI base addresses of PCI devices which are not
> described in device tree are not initialized before linux starts. So
> we use pci_bus_assign_resources() later to assign resources for them
> at ppc_md.pcibios_fixup(). But by original code, when
> ppc_md.pcibios_fixup() is called, resources are already claimed and
> pci_bus_assign_resource() does not work to assign resources.
>
> It may not be a good idea to call pci_bus_assign_resources() at the
> timing of ppc_md.pcibios_fixup(), but we did not find an alternative
> idea.
Hrm.. not everything should be claimed... there should be some space
left to assign remaining devices. I need to look into it. There are
several non resolved issues unfortunately with the ppc64 PCI code vs.
assigning resources. (Well, the issues are with the generic code in fact
which is what ppc64 uses. It tends to not work very well on setups where
some resources have already been assigned and some not).
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-17 22:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17 10:14 [PATCH 14/16] Resource assignments for PCI devices on Celleb Ishizaki Kou
2006-11-17 22:14 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2006-11-15 9:58 Ishizaki Kou
2006-11-15 23:56 ` Benjamin Herrenschmidt
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).