Received: by 10.223.185.116 with SMTP id b49csp1091467wrg; Sat, 3 Mar 2018 15:18:47 -0800 (PST) X-Google-Smtp-Source: AG47ELstdNEOBUjOVBn8k/U1BkdSW0VtiOsFxg6o1nPbmPwp46bTsFMHuqowhv+IrFPm+P4/BaVp X-Received: by 10.98.17.147 with SMTP id 19mr10274000pfr.160.1520119127090; Sat, 03 Mar 2018 15:18:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520119127; cv=none; d=google.com; s=arc-20160816; b=NyWBkDgrBOXENqhFxRdc8SXxAE7CtP5PXQXTfnfAfahBeCzToDp2vmV2tBYH66/IMp yV3i5N5vNZv8aanmVfjKkgLBlOpr5mePPM+ub7+UR+Ee247SE9lXXBNXGDl8RuKQb1tr 1ZTW7SUg1IPDuFOofsEE8SLMpVU783HWocX3S7aMzoxDeNNYt5NEq8Rp6j5bwN1qXUNZ 7oqyXmIP4Y8H8M2NNLm+oeLiRZLyIk4XPwz8Ej29aEAPpR0jPdFarqhNdsAM2fpVFPi7 mkLSosP14TTFq8E+OgtxWhlGr24SaXU5XqdVqkOWi+Bu1cBty7OXovTnGcsPA+Hti9Li qL2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=VFpixt3ZihPGivWoJnkLwL/MjHjbl15wwnQ1tN+tsgc=; b=e5grMBMtVSnTi6HQ+XKATGhhci0YX00zlHU74l0kEa1ptlLEFuJspUM/H+WQoi1qQs NKRn/HB4nKMkm5+FujjXo76k51PfISZDSCsf+8bP2aURACKYN9bKcv60bOXcHFDWbAzQ CHLPXXh9s/ZpTHRrAGrDdPYcIoHrf4L4msch2zXBAk//KoCaPxDhgiLA2ntSYgz2pJqM NEKiSrkVfbdGNuEfXVTv3Mo9ZQ7fJGAg3Zwz8MoUtUnCpL1rvYX4yDpWkR21OawhpJya XcFRuNhZNTgvVeHIFxbTn+3DvtNWYewYdvGAq7GZ1jVV9UdY17gowMz9356Il7rNGeoN sKFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=aVZas7qO; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8-v6si6838692pli.324.2018.03.03.15.18.32; Sat, 03 Mar 2018 15:18:47 -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=@microsoft.com header.s=selector1 header.b=aVZas7qO; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752069AbeCCXQs (ORCPT + 99 others); Sat, 3 Mar 2018 18:16:48 -0500 Received: from mail-cys01nam02on0111.outbound.protection.outlook.com ([104.47.37.111]:42492 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934899AbeCCWiM (ORCPT ); Sat, 3 Mar 2018 17:38:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VFpixt3ZihPGivWoJnkLwL/MjHjbl15wwnQ1tN+tsgc=; b=aVZas7qOU4ssvNljSXKsQsJmtBk4t/LghNpD0a6r6nIY+COzei3jDVas/AQdPYBMlhydcb9bHcJH3+sitINZr+u1YSw+/tSzOeWQ+ahLuH19h9sSBz6NfV9y7qaptJyyiU3BG3JdBFjs4j0QwThpo7OSq1lEGIxrceMM5H9Ydvk= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB1100.namprd21.prod.outlook.com (52.132.149.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Sat, 3 Mar 2018 22:37:56 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:37:56 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Prarit Bhargava , Bjorn Helgaas , Alex Williamson , David Arcari , Myron Stowe , Lukas Wunner , Keith Busch , Mika Westerberg , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 009/115] PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() Thread-Topic: [PATCH AUTOSEL for 4.4 009/115] PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() Thread-Index: AQHTsz9Jwwc1wvGH3028VAxyTTjO9w== Date: Sat, 3 Mar 2018 22:30:52 +0000 Message-ID: <20180303223010.27106-9-alexander.levin@microsoft.com> References: <20180303223010.27106-1-alexander.levin@microsoft.com> In-Reply-To: <20180303223010.27106-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MW2PR2101MB1100;7:nQ17cirzNPtLksgBUodwiOzQxuqg0TEXxYuqWwurkqFSJIvUS4tK4+h80nLeyi92gNSAanKiZJWnc3RxmvZ67MvAbjXUw0ED8ZuCY//QSfrbscsWjDST4y1Qws1rXLZ0pqv8zkaryL0TN2QMD0aiDE285H+CfhfElQo58SCDuyofo+LKmrcJt1aBToQ0kaFA/QwfM4jEiwY5Z2XNCgDJIr3LXvIGpW/9iZQpZJDGN+H1qwHWMPBPC4q2JjLwC6cp x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 100c5a8f-527a-4ae6-9fde-08d5815768d3 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MW2PR2101MB1100; x-ms-traffictypediagnostic: MW2PR2101MB1100: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(211936372134217)(153496737603132)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231220)(944501244)(52105095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:MW2PR2101MB1100;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB1100; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(376002)(39860400002)(396003)(366004)(346002)(54534003)(199004)(189003)(22452003)(97736004)(7736002)(5250100002)(105586002)(2906002)(6506007)(72206003)(966005)(66066001)(4326008)(305945005)(10290500003)(186003)(3280700002)(102836004)(2950100002)(6666003)(2501003)(478600001)(26005)(2900100001)(10090500001)(53936002)(8676002)(25786009)(81166006)(81156014)(575784001)(54906003)(7416002)(86362001)(6436002)(106356001)(110136005)(68736007)(36756003)(316002)(6512007)(5660300001)(107886003)(8936002)(1076002)(6486002)(3660700001)(99286004)(6306002)(76176011)(3846002)(86612001)(14454004)(6116002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB1100;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: GIQgkWW6XbQ29ZKdgrZtXfbwYdlLuP4z/AcRru2eo9+2vayeKocqohk/uQFeFzwZyIHz3zOtikFhPMj2HukXWZ+qtt9bjZ7tv0526F8FaJUFgYpHz9ltAaVXVe/b7nj/g8HasK2zsdEaroDsA/HEtN9FEw+g/1ipWnym3xj4sho= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 100c5a8f-527a-4ae6-9fde-08d5815768d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:30:52.4165 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=3D187351 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 --- drivers/pci/pci-driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 32bd8ab79d53..5e42b5f2f565 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -463,8 +463,6 @@ static void pci_device_shutdown(struct device *dev) =20 if (drv && drv->shutdown) drv->shutdown(pci_dev); - pci_msi_shutdown(pci_dev); - pci_msix_shutdown(pci_dev); =20 #ifdef CONFIG_KEXEC_CORE /* --=20 2.14.1