From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754873AbdCPXMk (ORCPT ); Thu, 16 Mar 2017 19:12:40 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:55021 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbdCPXMi (ORCPT ); Thu, 16 Mar 2017 19:12:38 -0400 Message-Id: <20170316215002.726697858@linutronix.de> User-Agent: quilt/0.63-1 Date: Thu, 16 Mar 2017 22:50:02 +0100 From: Thomas Gleixner To: LKML Cc: Bjorn Helgaas , x86@kernel.org, Peter Anvin , Borislav Petkov , Peter Zijlstra , Stephane Eranian , Andi Kleen Subject: [patch 0/7] x86/pci: Switch to lockless ECAM configuration mode Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andi reported that the Intel Uncore performance monitoring suffers from the global pci_lock which protects the generic PCI config space accessors. This lock can be removed on X86 because all architecture specific config space accessors are either serialized by a seperate lock or can be converted to have their own locking. The mmconfig based access (ECAM) does not require serialization at the config read/write level because the access is a simple byte/word/dword read from or write to the memory mapped configuration space. In that case the lock does not provide any more protection than the hardware provides already. The series converts the CE4100 PCI low level accessors to use the x86 specific pci_config_lock and implements the switch over to lockless ECAM configureation space accesors when the system is capable. Thanks, tglx --- arch/x86/Kconfig | 1 arch/x86/include/asm/pci.h | 8 --- arch/x86/include/asm/pci_x86.h | 15 +++---- arch/x86/pci/Makefile | 2 arch/x86/pci/ce4100.c | 87 ++++++++++++++++++++++------------------- arch/x86/pci/common.c | 16 +++++++ arch/x86/pci/legacy.c | 19 +++++--- arch/x86/pci/mmconfig-shared.c | 36 ++++++++++++++++ arch/x86/pci/mmconfig_32.c | 12 ----- arch/x86/pci/mmconfig_64.c | 16 +------ drivers/pci/Kconfig | 3 + drivers/pci/access.c | 16 +++++-- 12 files changed, 142 insertions(+), 89 deletions(-)