Message ID | 1449149725-27607-2-git-send-email-stanimir.varbanov@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp3500927lbb; Thu, 3 Dec 2015 05:37:54 -0800 (PST) X-Received: by 10.98.12.205 with SMTP id 74mr12975169pfm.53.1449149874080; Thu, 03 Dec 2015 05:37:54 -0800 (PST) Return-Path: <linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org> Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id wk6si12132191pac.91.2015.12.03.05.37.53 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 05:37:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a4U3j-0003ST-3W; Thu, 03 Dec 2015 13:36:31 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a4U3f-0003La-U0 for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2015 13:36:28 +0000 Received: by wmvv187 with SMTP id v187so27476434wmv.1 for <linux-arm-kernel@lists.infradead.org>; Thu, 03 Dec 2015 05:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l/x4p9Z44XCo1m9efhsGwHBvJXCDFXJ/Qy9fga1I1+A=; b=vPc3vbupvPzeZKqHSKEei0OfF1aYRrT3wkkZ7PmMZ4qT+m1zl/oQ37qLiEq5ndAAsh f+wc4xo2tU4JImnAq/lLSYoXYoRQCNA7vm3cQq7UKIwM+ZThfD/gz36+TTYfV2pkVzxw Y6Lmmb9tmF9x/PrWadqKzHFZKDQZX4CQkF8fAvGImJu9JNmxZ1LAtUBii4s2jYJ+sH3v TNHnXHC/LvX05jhgPLCsUlhlE8ldNEk2RFbTZL6aDIyZlKg9OGiS82soOYwvsP5RqJWB +jsXqB9CscFLRGKpFirtrps7WONOdlJWDZ5TuNka5FCpYZi/jI8hmD7rue+gXzKrPW+W j/Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l/x4p9Z44XCo1m9efhsGwHBvJXCDFXJ/Qy9fga1I1+A=; b=grz2oxh3bJjSb99mKcZyQd/D9G6zf0cBHBedZGp0hpG5kM8S4osO8DcBQ5bjh9fp3/ FWzOr1twet7R+JBbjeHgh7fKzo55Lw6z+CxPhj64sXMtOwZAVaW3lHTq5hq8HB/psfVC Xhaq7KG0bEvmAy1DnUKOZg+zuCmpEYn2ps0SiU3IXVAQRRxTq6CvgW348DrimLsxzvyf giixZ6IsZE/j+Z9mYV41vUqHRHENzCqgZak5fxfxQA06iWph+cfcWa2NqTTgEkzCbqWp XrPInxEc6qL9CbOKsR1dpRNBZnqQgV1AuDaEKZddiypBw5fGLW5hjsokJD3SQp/NVnTP +5oA== X-Gm-Message-State: ALoCoQmDGF7rDpauzX9abQ1AHCIOD3ttXmgN3IDtsBCRIyOQjyYL2Xrze+eTpb4ItjgcSSosQoox X-Received: by 10.28.143.11 with SMTP id r11mr52381823wmd.28.1449149766434; Thu, 03 Dec 2015 05:36:06 -0800 (PST) Received: from mms734.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id h189sm35769187wme.1.2015.12.03.05.36.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 05:36:05 -0800 (PST) From: Stanimir Varbanov <stanimir.varbanov@linaro.org> To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com> Subject: [PATCH v4 1/5] PCI: designware: add memory barrier after enabling region Date: Thu, 3 Dec 2015 15:35:20 +0200 Message-Id: <1449149725-27607-2-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1449149725-27607-1-git-send-email-stanimir.varbanov@linaro.org> References: <1449149725-27607-1-git-send-email-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151203_053628_135983_90C2AFDC X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:231 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, Arnd Bergmann <arnd@arndb.de>, Pawel Moll <pawel.moll@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Jingoo Han <jingoohan1@gmail.com>, Pratyush Anand <pratyush.anand@gmail.com>, Stanimir Varbanov <stanimir.varbanov@linaro.org>, Rob Herring <robh+dt@kernel.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Bjorn Andersson <bjorn.andersson@sonymobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org |
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 02a7452bdf23..ed4dc2e2553b 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -164,6 +164,11 @@ static void dw_pcie_prog_outbound_atu(struct pcie_port *pp, int index, dw_pcie_writel_rc(pp, upper_32_bits(pci_addr), PCIE_ATU_UPPER_TARGET); dw_pcie_writel_rc(pp, type, PCIE_ATU_CR1); dw_pcie_writel_rc(pp, PCIE_ATU_ENABLE, PCIE_ATU_CR2); + /* + * ensure that the ATU enable has been happaned before accessing + * pci configuration/io spaces through dw_pcie_cfg_[read|write]. + */ + wmb(); } static struct irq_chip dw_msi_irq_chip = {
Add 'write memory' barrier after enable region in PCIE_ATU_CR2 register. The barrier is needed to ensure that the region enable request has been reached it's destination at time when we read/write to PCI configuration space. Without this barrier PCI device enumeration during kernel boot is not reliable, and reading configuration space for particular PCI device on the bus returns zero aka no device. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> --- drivers/pci/host/pcie-designware.c | 5 +++++ 1 file changed, 5 insertions(+) -- 1.7.9.5 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel