From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AG47ELu551R9gHb8+O+pVO9tTviEm5kkKuP8iaXALL4P5WxDvQn0nchFY6ucR59qL9DpQvr38omj ARC-Seal: i=1; a=rsa-sha256; t=1521483214; cv=none; d=google.com; s=arc-20160816; b=oUcPKCQpytcl/sV9Yxfch/HCu1wLMZaUqqvsCLmJ6WC5qpY/DW2cfhSITaMkMLiGW5 cCFRv63qkb3yFWZAteVADxKp/K16w3H92XC0OUYo/Ni5972mAepY2ujUEWUk/zNxt+B8 PQBwzhezR1GxnpiMyiJSvdiiJ418rArrtN6MUu3+zDDOaJ+YfJsEm6Aol4guM/QIlf8V z/wb0IbT8sD5dBm7HdfE/4VCNeiImdd95pjKojzl3CzsfhRzAuw6dwE8RWN+a1Y13bR1 Y2SZ1HIzgBW11H+kol5p96RNgauGD85eNQYCIWKLplMjsZ45K6WnPHPnFXDF55ClYSZg /WMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=RyIVF2MP7xpZBYw/VmVEB8jB1CJLODif7mNzWPvIp8c=; b=zZhrmKDDOCMQOej9rzLstCel2didl/RL2Ig7Syj8+ZKCxonWYgaW1ZhAlwqDMpHWGJ cp+3zx4dgYJdmb8l/FYowRCSIWF7WiQziOW31DoJU0nHA+2uvbb3opbjA/qB7OpuA7Od LT+PiScgj03+ALElzwNRuh/KYhECZ4CGEnx5PJlDFV97M3Q+Zm2jAQDon45P6GDegjrB r6SZ7C3iruls29umeyVNau6VodJHc7d93FS7+HLqfdz+9pJyHcObxAV+YYYEHmv4DlAv STRCTeut0XEc/L729wfLq9XylP7EpMd9+C63cl5VEY50oPIDOhe6hGnek6TbhwGvWGwB 9p2w== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1595390574168988527?= X-GMAIL-MSGID: =?utf-8?q?1595390783467864632?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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 /*