Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6272214imu; Mon, 21 Jan 2019 06:11:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN6/FqmdwCY4IfL1DdPgmGEnAqS8OJkBiKWqHjX3DdYDIhPzfUuNIecwNqHZGjSigSp+BHIc X-Received: by 2002:a17:902:bf03:: with SMTP id bi3mr30323603plb.83.1548079860294; Mon, 21 Jan 2019 06:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079860; cv=none; d=google.com; s=arc-20160816; b=peosF6zD+nQZlbJapWD1UWr+Xl5+8D1oAAWF3Z8fWQlz0ISPwv25huDL3tmkvIM8ED iCajiFRMzic5VN5QoJGD5WesexqOa6fDreM61jPxSibYjsd1nY2vKLF1nVxc6IDipwlN RR91EHSulUnaFcnz3i8RtEkTunlOdxzwZXMzaqKRX2DnzP+zr6+pHibR17AmFXk08xpU Qg+fOAm/L9O/l3f7dFVxDL32YlxSSkOE544HEGdKszaLmx+aN9gOAqt+o7WOJZBV+vAy Tif9SmgNNSTtOP8bDbZQuGdR88eOKbn1EGLT1S6YboCxPUDTvXzGR7GLZSWUolmlh3XL UnOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Aj9bgCGqqgkztPJFui+Y3RbcpjTTBHY6qFrjFLKH1jQ=; b=EjPIHHfiXlXBOY9JgBz4qKvRtTEknoEyHZt2XdJg2GFjtOdG3quZlVhrbI0vcrWrm4 Mb0YG34h1XQVxT/ARmQG3YeqA0m5dSOLqckt+JaZwtkJb2aU2GAY9xS1MFt0biKNVcRx CcUu48xIhWsSoVVwjPTk2ZnPYn76O6bFSQxfvamGtvAS/rOt859Ad4zSVGPRWYT5Jx1x Y31E1NGDqY+BhF6A22HsXVbGa4UCPvI6iYPchlmuVYxepg8urRjnfTMKOFAnxGxDMAUA 8XJt0GewvPLSGt9dSeRzK6MjCnOAQLoEUpM78c/kv94Cxgs1A01tf2DnSDwiJGnknjma eouw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KJQYH2yd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si13295612plh.385.2019.01.21.06.10.44; Mon, 21 Jan 2019 06:11:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KJQYH2yd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731728AbfAUNz2 (ORCPT + 99 others); Mon, 21 Jan 2019 08:55:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:40056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731699AbfAUNzZ (ORCPT ); Mon, 21 Jan 2019 08:55:25 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 10BE62084C; Mon, 21 Jan 2019 13:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548078924; bh=AqR9cnwtZYVrHZoFWI8UQ6jzsT82xMVrjBaY4w4xInA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KJQYH2yd6/s0vwBG1DJSnXcYn89Cf9eTHPBb+Rn3lv3UBCBkzv/Ed+9EWOeqSTvLv sJU3BZuIv+2gZ0ttISEW3odCodMYB3NO8uIYWgHNM0O/XoyPbLnaMtAu1FWW56+hyg FBd6HVzCkBNvFZJKc8xXh3EJqNl54XGtiCJUS2N8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YunQiang Su , Paul Burton , pburton@wavecomp.com, linux-mips@vger.kernel.org, aaro.koskinen@iki.fi Subject: [PATCH 4.9 30/51] Disable MSI also when pcie-octeon.pcie_disable on Date: Mon, 21 Jan 2019 14:44:26 +0100 Message-Id: <20190121122456.442226147@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121122453.700446926@linuxfoundation.org> References: <20190121122453.700446926@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: YunQiang Su commit a214720cbf50cd8c3f76bbb9c3f5c283910e9d33 upstream. Octeon has an boot-time option to disable pcie. Since MSI depends on PCI-E, we should also disable MSI also with this option is on in order to avoid inadvertently accessing PCIe registers. Signed-off-by: YunQiang Su Signed-off-by: Paul Burton Cc: pburton@wavecomp.com Cc: linux-mips@vger.kernel.org Cc: aaro.koskinen@iki.fi Cc: stable@vger.kernel.org # v3.3+ Signed-off-by: Greg Kroah-Hartman --- arch/mips/pci/msi-octeon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/arch/mips/pci/msi-octeon.c +++ b/arch/mips/pci/msi-octeon.c @@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void) int irq; struct irq_chip *msi; - if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { + if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) { + return 0; + } else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0; msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1; msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2;