Re: [PATCH] Move set_pci_bus_resources_arch_default into arch/x86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Wilcox wrote:
> Commit 30a18d6c3f1e774de656ebd8ff219d53e2ba4029 introduced a new function
> to set the PCI bus resources.  Unfortunately, neither the author, nor
> the committers seemed to know that we already have somewhere to do that
> -- pcibios_fixup_bus().  This patch moves the hook (used only by the K8
> code) into x86-specific code where it should have been in the first place.
>
> Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxxxx>
> Cc: Yinghai Lu <yinghai.lu@xxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
> index 8c362b9..f80ece5 100644
> --- a/arch/x86/pci/common.c
> +++ b/arch/x86/pci/common.c
> @@ -142,15 +142,20 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
>  	}
>  }
>  
> +void __attribute__((weak)) set_pci_bus_resources_arch_default(struct pci_bus *b)
> +{
> +}
> +
>  /*
>   *  Called after each bus is probed, but before its children
>   *  are examined.
>   */
>  
> -void __devinit  pcibios_fixup_bus(struct pci_bus *b)
> +void __devinit pcibios_fixup_bus(struct pci_bus *b)
>  {
>  	struct pci_dev *dev;
>  
> +	set_pci_bus_resources_arch_default(b);
>  	pci_read_bridge_bases(b);
>  	list_for_each_entry(dev, &b->devices, bus_list)
>  		pcibios_fixup_device_resources(dev);
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 8eb50df..e3c3e08 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -1118,10 +1118,6 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
>  	return max;
>  }
>  
> -void __attribute__((weak)) set_pci_bus_resources_arch_default(struct pci_bus *b)
> -{
> -}
> -
>  struct pci_bus * pci_create_bus(struct device *parent,
>  		int bus, struct pci_ops *ops, void *sysdata)
>  {
> @@ -1180,8 +1176,6 @@ struct pci_bus * pci_create_bus(struct device *parent,
>  	b->resource[0] = &ioport_resource;
>  	b->resource[1] = &iomem_resource;
>  
> -	set_pci_bus_resources_arch_default(b);
> -
>  	return b;
>  
>  dev_create_file_err:
>
>   
Nacked-by: Yinghai Lu <yinghai@xxxxxxxxxx>

we should not move that calling from pci_create_bus to
pci_scan_child_bus/pcibios_fixup_bus
becuase that calling will be checked for all child buses.


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux