Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1409238
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V8 9/9] pci, acpi: ARM64 support for ACPI based generic PCI host controller |
| Date | 2016-05-30 17:40 +0200 |
| Message-ID | <rExsl-63s-5@gated-at.bofh.it> (permalink) |
| References | <rEx8Z-5Uj-3@gated-at.bofh.it> <rEx91-5Uj-49@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Monday, May 30, 2016 5:14:22 PM CEST Tomasz Nowicki wrote:
> + bsz = 1 << pci_generic_ecam_ops.bus_shift;
> + cfgres.start = root->mcfg_addr + bus_res->start * bsz;
> + cfgres.end = cfgres.start + resource_size(bus_res) * bsz - 1;
> + cfgres.flags = IORESOURCE_MEM;
> + cfg = pci_ecam_create(&root->device->dev, &cfgres, bus_res,
> + &pci_generic_ecam_ops);
> + if (IS_ERR(cfg)) {
> + pr_err("%04x:%pR error %ld mapping CAM\n", seg, bus_res,
> + PTR_ERR(cfg));
> + return PTR_ERR(cfg);
> + }
> +
> + ri->cfg = cfg;
> + return 0;
> +}
I wonder if we could do this a little simpler and just put a pointer
to the mmconfig space into struct pci_host_bridge, and then have a trivial
map_bus function alongside pci_generic_config_read/pci_generic_config_write.
As this code is specific to arch/arm64, we don't need any of the complexity
of drivers/pci/ecam.c, which basically only exists to work around the
limited virtual address space of 32-bit machines.
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V8 0/9] Support for ARM64 ACPI based PCI host controller Tomasz Nowicki <tn@semihalf.com> - 2016-05-30 17:20 +0200
[PATCH V8 4/9] acpi, pci: Support IO resources when parsing PCI host bridge resources. Tomasz Nowicki <tn@semihalf.com> - 2016-05-30 17:20 +0200
[PATCH V8 9/9] pci, acpi: ARM64 support for ACPI based generic PCI host controller Tomasz Nowicki <tn@semihalf.com> - 2016-05-30 17:20 +0200
Re: [PATCH V8 9/9] pci, acpi: ARM64 support for ACPI based generic PCI host controller Arnd Bergmann <arnd@arndb.de> - 2016-05-30 17:40 +0200
Re: [PATCH V8 9/9] pci, acpi: ARM64 support for ACPI based generic PCI host controller Jayachandran C <jchandra@broadcom.com> - 2016-05-30 18:20 +0200
csiph-web