Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677154

Re: [patch 4/7] PCI: Provide Kconfig option for lockless config space accessors

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [patch 4/7] PCI: Provide Kconfig option for lockless config space accessors
Date 2017-06-28 22:40 +0200
Message-ID <tXrUL-29U-35@gated-at.bofh.it> (permalink)
References <tlMQx-5vf-1@gated-at.bofh.it> <tlMQx-5vf-3@gated-at.bofh.it> <tX63U-6ch-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 27 Jun 2017, Bjorn Helgaas wrote:
> On Thu, Mar 16, 2017 at 10:50:06PM +0100, Thomas Gleixner wrote:
> > Provide a kernel config option which can be selected by an architecture
> > when the low level PCI configuration space accessors in the architecture
> > use their own serialization or can operate completely lockless.
> 
> The arch/x86/pci/common.c comment:
> 
>   /*
>    * This interrupt-safe spinlock protects all accesses to PCI
>    * configuration space.
>    */
>   DEFINE_RAW_SPINLOCK(pci_config_lock);
> 
> is no longer quite correct.

Yes. I updated it to:

 * This interrupt-safe spinlock protects all accesses to PCI configuration
 * space, except for the mmconfig (ECAM) based operations.

> I think the raw_pci_read() and raw_pci_write() implementations are
> such that we use the old locked accessors for the first 256 bytes,
> even when ECAM is available.  Not necessarily a problem, just an
> observation.

No, we actually don't after the next patch, which replaces the
pci_root_ops.read/write function pointers with the lockless ECAM accessors
after the end of the initialization, if none of the special quirks replaced
raw_pci_ext_ops and mmconfig/ECAM is available.

> I guess the uncore PMU registers are in the extended config space.

Yes.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [patch 4/7] PCI: Provide Kconfig option for lockless config  space accessors Bjorn Helgaas <helgaas@kernel.org> - 2017-06-27 23:20 +0200
  Re: [patch 4/7] PCI: Provide Kconfig option for lockless config  space accessors Thomas Gleixner <tglx@linutronix.de> - 2017-06-28 22:40 +0200

csiph-web