Received: by 10.213.65.68 with SMTP id h4csp1779858imn; Mon, 19 Mar 2018 13:03:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELv/lGBXe37Zgv29oS4fMvPESyDM8CirRHj7HhW36o9aHcsRYD30HEhAmEdxRU655064DYm1 X-Received: by 2002:a17:902:5a4e:: with SMTP id f14-v6mr13517813plm.116.1521489814836; Mon, 19 Mar 2018 13:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521489814; cv=none; d=google.com; s=arc-20160816; b=emkohVOv3IjDyzW5oLtd/ChgOqtHNjc6c3Ix1aHM/fuC1ZuGLKOiS0gwWfQ3xUKv/P uMMN0qFoRw8a/nEqZHv/h70K5AqgLShI99cNDha26Y3N5+iNDE8UrQ0HGmj9UP8ov2TV Xmh9YbpKBCY8E3BPmxwszItbqDy3VSsPp/CfF+yv4OzoNRsOzmS2CcxMOWX5fA3rUbGw aUVNKYZDSsYH3auu5ZkJRyHV69dnxQ9z6LuQcuWP4UwlSNHRGiRQgvBe2xfUUKEUwqAO q+LTSKiyvWmWlFJTcwioypuAmKkwHg96SvfY2ZnEFcXCLlvWxZKUhQTP05gHt5i7uQv7 nsYg== 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=1Wl4Djimu/dLk4GQhVqfhdWyhGMwPRoJ5Gb4WxzL134=; b=r4gGSFtbsSxUWhTxEOlv57VDKHo1b4qHguIySs0EKnixYQtjBjnNS5BcwWsVIWBvX9 GHcBalSFgW5y84tTu1V/SyFOQgcJ+lySfWvIV750hZj69LNWDQfx2BkAt4kbYORnrbSw wBrYL00vloCXbsyu1PGOzfVsE9QNBtqRQ2vBFQWpcfUnnXgYEG3fvanqUIPCxGHw6sfq hs3BpsbpVGVURrQ9feIo3dwNYSVUnKPq1xssKBShOeOyjbmIPPOMsci47r9j54Ofh1sA 4FLVJjST5NR33Ge6D0e7SFzjAIEAwncSnEg3npw14lAvxsZxBsMhkq6j+kCBwCsQjAuW HL4Q== 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 b65si480651pfk.265.2018.03.19.13.03.19; Mon, 19 Mar 2018 13:03:34 -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 S970986AbeCSUAV (ORCPT + 99 others); Mon, 19 Mar 2018 16:00:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46578 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969340AbeCSSSg (ORCPT ); Mon, 19 Mar 2018 14:18:36 -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 4E15B1079; Mon, 19 Mar 2018 18:18:35 +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.9 018/241] PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() Date: Mon, 19 Mar 2018 19:04:43 +0100 Message-Id: <20180319180751.920812867@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-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); /* * If this is a kexec reboot, turn off Bus Master bit on the