Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600430
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig |
| Date | 2017-03-14 15:00 +0100 |
| Message-ID | <tkV9x-Uf-21@gated-at.bofh.it> (permalink) |
| References | <tgKw1-2hO-11@gated-at.bofh.it> <tgNDA-4Ek-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 2 Mar 2017, Andi Kleen wrote:
> +struct pci_ops pci_mmconfig_ops = {
> + .read = pci_mmconfig_read,
> + .write = pci_mmconfig_write,
> +};
> +
> +/* Force all config accesses to go through mmconfig. */
> +int pci_bus_force_mmconfig(struct pci_bus *bus)
> +{
> + if (!raw_pci_ext_ops)
> + return -1;
We have error defines. That aside, the weak version of this returns 0,
i.e. success, but here you return fail. Consistency is overrated, right?
> + bus->ops = &pci_mmconfig_ops;
What guarantees that raw_pci_ext_ops == pci_mmcfg? Nothing as far as I can
tell. So that function name is nonsensical. It does not force anything.
And the way how this function is used is a horrible hack. It's called from
a random driver at some random point in time.
The proper solution is to identify the bus at the point where the bus is
discovered and switch it to mmconfig if possible.
Thanks,
tglx
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/4] pci: Allow lockless access path to PCI mmconfig Andi Kleen <andi@firstfloor.org> - 2017-03-03 03:20 +0100
[PATCH 3/4] x86, pci: Add interface to force mmconfig Andi Kleen <andi@firstfloor.org> - 2017-03-03 06:10 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Thomas Gleixner <tglx@linutronix.de> - 2017-03-14 15:00 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Andi Kleen <ak@linux.intel.com> - 2017-03-14 16:50 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Thomas Gleixner <tglx@linutronix.de> - 2017-03-14 17:50 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Andi Kleen <ak@linux.intel.com> - 2017-03-14 18:10 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Thomas Gleixner <tglx@linutronix.de> - 2017-03-14 19:00 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Bjorn Helgaas <helgaas@kernel.org> - 2017-03-14 20:50 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Andi Kleen <andi@firstfloor.org> - 2017-03-15 03:30 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Bjorn Helgaas <helgaas@kernel.org> - 2017-03-15 04:00 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Thomas Gleixner <tglx@linutronix.de> - 2017-03-15 11:10 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Bjorn Helgaas <helgaas@kernel.org> - 2017-03-15 15:20 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Andi Kleen <andi@firstfloor.org> - 2017-03-16 01:10 +0100
Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Thomas Gleixner <tglx@linutronix.de> - 2017-03-16 23:50 +0100
Re: [PATCH 1/4] pci: Allow lockless access path to PCI mmconfig Thomas Gleixner <tglx@linutronix.de> - 2017-03-14 14:10 +0100
Re: [PATCH 1/4] pci: Allow lockless access path to PCI mmconfig "H. Peter Anvin" <hpa@zytor.com> - 2017-03-14 18:30 +0100
csiph-web