[PATCH] remove linux,pci-domain from OFDT

Anton Blanchard anton at samba.org
Fri Aug 6 02:01:13 EST 2004


Hi,

> The patch below scraps the creation of the "linux,pci-domain" property in the
> OF device tree for each PCI Host Bridge.  This seems appropriate for the
> following reasons:

I think Martin wanted it for some userspace tools. However, if it isnt
even making it into the device-tree, then I agree its a good candidate
for removal :)

Anton

> 1) It isn't referenced/used in the kernel.
> 2) It isn't exported to userspace, since it's added after /proc/device-tree
>    is created.
> 3) Even if it was correctly exported to userspace, the same info is already
>    available in sysfs.
>
> Please apply, if there are no problems.
>
> Thanks-
> John
>
> Signed-off-by:  John Rose <johnrose at austin.ibm.com>
>
> diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c
> --- a/arch/ppc64/kernel/pSeries_pci.c	Mon Jul 26 17:50:29 2004
> +++ b/arch/ppc64/kernel/pSeries_pci.c	Mon Jul 26 17:50:29 2004
> @@ -402,7 +402,6 @@
>  	int *bus_range;
>  	char *model;
>  	enum phb_types phb_type;
> - 	struct property *of_prop;
>
>  	model = (char *)get_property(dev, "model", NULL);
>
> @@ -448,21 +447,6 @@
>  		kfree(phb);
>  		return NULL;
>  	}
> -
> -	of_prop = (struct property *)alloc_bootmem(sizeof(struct property) +
> -			sizeof(phb->global_number));
> -
> -	if (!of_prop) {
> -		kfree(phb);
> -		return NULL;
> -	}
> -
> -	memset(of_prop, 0, sizeof(struct property));
> -	of_prop->name = "linux,pci-domain";
> -	of_prop->length = sizeof(phb->global_number);
> -	of_prop->value = (unsigned char *)&of_prop[1];
> -	memcpy(of_prop->value, &phb->global_number, sizeof(phb->global_number));
> -	prom_add_property(dev, of_prop);
>
>  	phb->first_busno =  bus_range[0];
>  	phb->last_busno  =  bus_range[1];

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list