Received: by 10.213.65.68 with SMTP id h4csp1795058imn; Mon, 19 Mar 2018 13:28:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELs6v2ToPlMCpREtIiLySvCS0CBo8akWaxzoZTIjlbeKSgrn24Gz1PR06o/yts9mj33/HXhO X-Received: by 2002:a17:902:2e43:: with SMTP id q61-v6mr13568864plb.404.1521491318311; Mon, 19 Mar 2018 13:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521491318; cv=none; d=google.com; s=arc-20160816; b=OSuEHCVh58qGYs7A66viPgGYXOuwlO/9AGI4MdJX3vG9Dl6tcaaBnbncDbbloR6MNR 0vqn1VWN51nPfK7o/wmBClq5QzTqJDCReUrPCFV2FLzkRFlhpTiSRVin+AJij12uGb0Z W6c66wqUtus7IVGLWyRFr6JdNnJF87KarkQzA5EKeWuqZ9yI8f83FuJhRw0Mumz+ZKO8 MCQ5Q3Ih5SbfyyRvw3+f3RsGv5C966hXt5b0QAli9dmAIiU/2mYGoNLRm3Ll9niUE+i6 Ev5QlG12/MswZUKyOyOMl2g0N1LVS7afoVYiUChOSd5zDBcukMHR0xNz9ZR6TiC7lnFX MNBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=RyIVF2MP7xpZBYw/VmVEB8jB1CJLODif7mNzWPvIp8c=; b=iK7R5ZMl5lFLrNHmrrLtuyGUJYlWhi04xmZZ1SjohQvwcRNfRAuaddAzavOTbc+pG+ MeRwc+hqIWQc86701Ki4g8PcOEC/UjnjyAN3ssA1F6jGoZUNq2lWXBHA+owv8ajFaTUo BbyF2+5PQPVKmTxhQYXeUkKNNcebLOQ7OMnqUrH/f6NVjXdIcYTAu/UwBhaBFAYFSroy rRuV6tGjTEIJkWrNL9TD6za+huA8P22u4EawrLytJpdk0WWznrl8KKSApxZBy3zEtyjB V1o/vgjrpytor1rTuqY1HRN5aaegr0GAhD/6FXlSqstAmvrbzmiLIhTQbBkK/t766+nW SpMA== ARC-Authentication-Results: i=1; mx.google.com; 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 b17si32433pfd.155.2018.03.19.13.28.23; Mon, 19 Mar 2018 13:28:38 -0700 (PDT) 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; 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 S968778AbeCSSNk (ORCPT + 99 others); Mon, 19 Mar 2018 14:13:40 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43670 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030569AbeCSSNf (ORCPT ); Mon, 19 Mar 2018 14:13:35 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1549B88D; Mon, 19 Mar 2018 18:13:34 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Prarit Bhargava , Bjorn Helgaas , Alex Williamson , David Arcari , Myron Stowe , Lukas Wunner , Keith Busch , Mika Westerberg , Sasha Levin Subject: [PATCH 4.4 009/134] PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() Date: Mon, 19 Mar 2018 19:04:52 +0100 Message-Id: <20180319171850.444128621@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Prarit Bhargava [ Upstream commit fda78d7a0ead144f4b2cdb582dcba47911f4952c ] The pci_bus_type .shutdown method, pci_device_shutdown(), is called from device_shutdown() in the kernel restart and shutdown paths. Previously, pci_device_shutdown() called pci_msi_shutdown() and pci_msix_shutdown(). This disables MSI and MSI-X, which causes the device to fall back to raising interrupts via INTx. But the driver is still bound to the device, it doesn't know about this change, and it likely doesn't have an INTx handler, so these INTx interrupts cause "nobody cared" warnings like this: irq 16: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.2-1.el7_UNSUPPORTED.x86_64 #1 Hardware name: Hewlett-Packard HP Z820 Workstation/158B, BIOS J63 v03.90 06/ ... The MSI disabling code was added by d52877c7b1af ("pci/irq: let pci_device_shutdown to call pci_msi_shutdown v2") because a driver left MSI enabled and kdump failed because the kexeced kernel wasn't prepared to receive the MSI interrupts. Subsequent commits 1851617cd2da ("PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI") and e80e7edc55ba ("PCI/MSI: Initialize MSI capability for all architectures") changed the kexeced kernel to disable all MSIs itself so it no longer depends on the crashed kernel to clean up after itself. Stop disabling MSI/MSI-X in pci_device_shutdown(). This resolves the "nobody cared" unhandled IRQ issue above. It also allows PCI serial devices, which may rely on the MSI interrupts, to continue outputting messages during reboot/shutdown. [bhelgaas: changelog, drop pci_msi_shutdown() and pci_msix_shutdown() calls altogether] Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=187351 Signed-off-by: Prarit Bhargava Signed-off-by: Bjorn Helgaas CC: Alex Williamson CC: David Arcari CC: Myron Stowe CC: Lukas Wunner CC: Keith Busch CC: Mika Westerberg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pci-driver.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -463,8 +463,6 @@ static void pci_device_shutdown(struct d if (drv && drv->shutdown) drv->shutdown(pci_dev); - pci_msi_shutdown(pci_dev); - pci_msix_shutdown(pci_dev); #ifdef CONFIG_KEXEC_CORE /*