From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1903DC282C3 for ; Thu, 24 Jan 2019 19:22:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2C8B218D9 for ; Thu, 24 Jan 2019 19:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548357744; bh=oPbKVK7vUWjaLBtF3RNKIvL6OKZ8rt8Gs0wEeSuTnWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=GYApUpXaiddCk597LRIrwfVhZy7ZrnWFiihZkay8LJoIgTXIpdW33R+PRPfQwqamd S/V9BWAbnn/tdwT82uWB+qWv6FkBGqWjE7MR2mEN9zV8RwRbyoSCj1IzdI88co5KH2 oX5ag9WAttpgRYZNMTiF1KMbrzgsWizPHIeRm8mA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729537AbfAXTWX (ORCPT ); Thu, 24 Jan 2019 14:22:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:46916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729512AbfAXTWV (ORCPT ); Thu, 24 Jan 2019 14:22:21 -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 106A7218CD; Thu, 24 Jan 2019 19:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548357740; bh=oPbKVK7vUWjaLBtF3RNKIvL6OKZ8rt8Gs0wEeSuTnWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SrUyhYdhaqKZ9rkvZlFpiF9h0hbzkrgsYr8wntiW+JAQP4mjYJ7mp0q03EcZDvYQs g3Evk078zWqi/V3LOB9sObN8DfLQRWkv441/iFpHi2+swSkeMTRftVSbaxvH5YjS84 hoVSwlV7j0XB/YCx6G+GOvCZnpptTq2jlJ11wfMA= 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 3.18 23/52] Disable MSI also when pcie-octeon.pcie_disable on Date: Thu, 24 Jan 2019 20:19:47 +0100 Message-Id: <20190124190145.185246294@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124190140.879495253@linuxfoundation.org> References: <20190124190140.879495253@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 3.18-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;