From patchwork Fri Nov 7 13:27:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 40402 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8E31124237 for ; Fri, 7 Nov 2014 13:28:32 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id l18sf1877631wgh.4 for ; Fri, 07 Nov 2014 05:28:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=RNXlkE42Z22uVKLRxQB+XZzaHEMIaYT8w31Ck0pUC9c=; b=BAuFOjFRU3xdfC4en8Kme53kIKf1k85RgAuTqdNBHFa8Yef0j2sZgSVmrAn+P78jTz 86DH5R+Ht4RpilR3GX21OuoIYm37fgpt0TrBp4q3b54/kYEmycucONRY/sLrO84qLLyw JGKBvY1M3Rw2LYpcB/VnA7XDHxTiY6GvbC/2AmiYnFk01BFP86SoXUCdoufYDEnoU0xl dht1ARUiisQRyCIebRNiCz8AFsF63YhLfukllbnAgNaqxwujL8sCGRDdDPgiIflV4Y6j 5IoEd1XVTGAzQUhmL83hQ5vKXIQJ2h0+VGfQv+6m1IBebYePciAEDmlJZAzB95i3amIZ zvzQ== X-Gm-Message-State: ALoCoQkl93uzNjxw41L5YfVhl+zqqKL3nV2yfSor3pVM+V7t0IdIoZn+uDegnElgswCQvl7Lp2sd X-Received: by 10.181.29.201 with SMTP id jy9mr660660wid.1.1415366911588; Fri, 07 Nov 2014 05:28:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.226 with SMTP id z2ls215102lad.13.gmail; Fri, 07 Nov 2014 05:28:30 -0800 (PST) X-Received: by 10.112.77.233 with SMTP id v9mr2476956lbw.45.1415366910939; Fri, 07 Nov 2014 05:28:30 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id lv8si15264950lac.4.2014.11.07.05.28.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 05:28:30 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id n15so2640678lbi.6 for ; Fri, 07 Nov 2014 05:28:30 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr2102614lbc.66.1415366910857; Fri, 07 Nov 2014 05:28:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp196494lbc; Fri, 7 Nov 2014 05:28:29 -0800 (PST) X-Received: by 10.66.235.165 with SMTP id un5mr12010498pac.109.1415366908409; Fri, 07 Nov 2014 05:28:28 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cu3si9036217pbc.108.2014.11.07.05.28.27 for ; Fri, 07 Nov 2014 05:28:28 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752829AbaKGN2W (ORCPT + 25 others); Fri, 7 Nov 2014 08:28:22 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:36176 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752764AbaKGN2R (ORCPT ); Fri, 7 Nov 2014 08:28:17 -0500 Received: by mail-wi0-f181.google.com with SMTP id n3so4583696wiv.2 for ; Fri, 07 Nov 2014 05:28:16 -0800 (PST) X-Received: by 10.180.82.170 with SMTP id j10mr5107028wiy.35.1415366896121; Fri, 07 Nov 2014 05:28:16 -0800 (PST) Received: from tn-HP-4.semihalf.com ([80.82.22.190]) by mx.google.com with ESMTPSA id ce1sm11833490wjc.2.2014.11.07.05.28.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Nov 2014 05:28:15 -0800 (PST) From: Tomasz Nowicki To: catalin.marinas@arm.com, will.deacon@arm.com, bhelgaas@google.com, Liviu.Dudau@arm.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, rjw@rjwysocki.net Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org, Tomasz Nowicki Subject: [RFC PATCH 2/4] x86, acpi, pci: Isolate new PCI mmconfig entry insertion. Date: Fri, 7 Nov 2014 14:27:54 +0100 Message-Id: <1415366876-30811-3-git-send-email-tomasz.nowicki@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415366876-30811-1-git-send-email-tomasz.nowicki@linaro.org> References: <1415366876-30811-1-git-send-email-tomasz.nowicki@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tomasz.nowicki@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add special pci_mmcfg_insert_lock mutex since pci_mmcfg_lock was moved to common file. No functional changes. Signed-off-by: Tomasz Nowicki --- arch/x86/pci/mmconfig-shared.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 94c3d38..d1e45e7 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -28,6 +28,7 @@ /* Indicate if the mmcfg resources have been placed into the resource table. */ static bool pci_mmcfg_running_state; static bool pci_mmcfg_arch_init_failed; +static DEFINE_MUTEX(pci_mmcfg_insert_lock); static const char *__init pci_mmcfg_e7520(void) { @@ -566,7 +567,7 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, if (start > end) return -EINVAL; - mutex_lock(&pci_mmcfg_lock); + mutex_lock(&pci_mmcfg_insert_lock); cfg = pci_mmconfig_lookup(seg, start); if (cfg) { if (cfg->end_bus < end) @@ -575,12 +576,12 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, "domain %04x [bus %02x-%02x] " "only partially covers this bridge\n", cfg->segment, cfg->start_bus, cfg->end_bus); - mutex_unlock(&pci_mmcfg_lock); + mutex_unlock(&pci_mmcfg_insert_lock); return -EEXIST; } if (!addr) { - mutex_unlock(&pci_mmcfg_lock); + mutex_unlock(&pci_mmcfg_insert_lock); return -EINVAL; } @@ -621,7 +622,7 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, kfree(cfg); } - mutex_unlock(&pci_mmcfg_lock); + mutex_unlock(&pci_mmcfg_insert_lock); return rc; }