Re: [RFC PATCH 01/16] PCI: Enhance pci_scan_root_bus() to support default IO/MEM resources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [RFC PATCH 01/16] PCI: Enhance pci_scan_root_bus() to support default IO/MEM resources
- From: Arnd Bergmann <arnd@xxxxxxxx>
- Date: Mon, 17 Nov 2014 11:08:34 +0100
- Cc: Yijing Wang <wangyijing@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Liviu Dudau <liviu@xxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Xinwei Hu <huxinwei@xxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Yijing Wang <wangyijing0307@xxxxxxxxx>, Suravee.Suthikulpanit@xxxxxxx, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Wuyun <wuyun.wu@xxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx
- In-reply-to: <1416219710-26088-2-git-send-email-wangyijing@huawei.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1416219710-26088-1-git-send-email-wangyijing@huawei.com> <1416219710-26088-2-git-send-email-wangyijing@huawei.com>
- User-agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; )
On Monday 17 November 2014 18:21:35 Yijing Wang wrote:
> - list_for_each_entry(window, resources, list)
> - if (window->res->flags & IORESOURCE_BUS) {
> - found = true;
> - break;
> - }
> + if (!resources) {
> + pci_add_resource(&default_res, &ioport_resource);
> + pci_add_resource(&default_res, &iomem_resource);
> + pci_add_resource(&default_res, &busn_resource);
> + } else {
>
Isn't it almost always wrong to do this? You are adding all of the
I/O ports and memory to the host bridge, which will prevent you from
adding another host bridge, and the iomem_resource normally
includes a lot of addresses that are not accessible by the PCI host.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]