linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/20] [powerpc] Remove linux,pci-domain properties
@ 2006-07-04  6:47 Jeremy Kerr
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Kerr @ 2006-07-04  6:47 UTC (permalink / raw)
  To: linuxppc-dev

The linux,pci-domain property is no longer used by DLPAR/PCI Hotplug
utilites, or LSVPD. This change removes it.

Built for ppc64_defconfig.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---

 pci_64.c |   39 +--------------------------------------
 1 file changed, 1 insertion(+), 38 deletions(-)

Index: linux-2.6/arch/powerpc/kernel/pci_64.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/pci_64.c
+++ linux-2.6/arch/powerpc/kernel/pci_64.c
@@ -185,34 +185,6 @@ static void __devinit pci_setup_pci_cont
 	spin_unlock(&hose_spinlock);
 }
 
-static void add_linux_pci_domain(struct device_node *dev,
-				 struct pci_controller *phb)
-{
-	struct property *of_prop;
-	unsigned int size;
-
-	of_prop = (struct property *)
-		get_property(dev, "linux,pci-domain", &size);
-	if (of_prop != NULL)
-		return;
-	WARN_ON(of_prop && size < sizeof(int));
-	if (of_prop && size < sizeof(int))
-		of_prop = NULL;
-	size = sizeof(struct property) + sizeof(int);
-	if (of_prop == NULL) {
-		if (mem_init_done)
-			of_prop = kmalloc(size, GFP_KERNEL);
-		else
-			of_prop = alloc_bootmem(size);
-	}
-	memset(of_prop, 0, sizeof(struct property));
-	of_prop->name = "linux,pci-domain";
-	of_prop->length = sizeof(int);
-	of_prop->value = (unsigned char *)&of_prop[1];
-	*((int *)of_prop->value) = phb->global_number;
-	prom_add_property(dev, of_prop);
-}
-
 struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
 {
 	struct pci_controller *phb;
@@ -226,22 +198,13 @@ struct pci_controller * pcibios_alloc_co
 	pci_setup_pci_controller(phb);
 	phb->arch_data = dev;
 	phb->is_dynamic = mem_init_done;
-	if (dev) {
+	if (dev)
 		PHB_SET_NODE(phb, of_node_to_nid(dev));
-		add_linux_pci_domain(dev, phb);
-	}
 	return phb;
 }
 
 void pcibios_free_controller(struct pci_controller *phb)
 {
-	if (phb->arch_data) {
-		struct device_node *np = phb->arch_data;
-		int *domain = (int *)get_property(np,
-						  "linux,pci-domain", NULL);
-		if (domain)
-			*domain = -1;
-	}
 	if (phb->is_dynamic)
 		kfree(phb);
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [PATCH 3/20] [powerpc] Remove linux,pci-domain properties
@ 2006-07-04  7:55 Milton Miller
  2006-07-04 23:22 ` Jeremy Kerr
  0 siblings, 1 reply; 3+ messages in thread
From: Milton Miller @ 2006-07-04  7:55 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: linuxppc-dev, Paul Mackerras

On Tue Jul 4 16:47:18 EST 2006, Jeremy Kerr wrote:
> The linux,pci-domain property is no longer used by DLPAR/PCI Hotplug
> utilites, or LSVPD. This change removes it.

So if I have some device-tree path and want to find the sysfs node
for it or run something like lspci on it, I have to search all of
sysfs for a matching devspec file?  (And this can change each boot.)

Without looking at the mentioned utilities, DLPAR and PCI Hotplug get a 
location code, so I'm hoping that the pci slot name is identified by 
that.  Is lsvpd scanning?  Or does it scan sysfs first and 
/proc/device-tree secondarly?

milton

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-04 23:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04  6:47 [PATCH 3/20] [powerpc] Remove linux,pci-domain properties Jeremy Kerr
  -- strict thread matches above, loose matches on Subject: below --
2006-07-04  7:55 Milton Miller
2006-07-04 23:22 ` Jeremy Kerr

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).