From patchwork Sat Oct 3 09:35:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 7320611 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 70211BEEA4 for ; Sat, 3 Oct 2015 09:35:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB293207B7 for ; Sat, 3 Oct 2015 09:35:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D60A3203B1 for ; Sat, 3 Oct 2015 09:35:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F4326E203; Sat, 3 Oct 2015 02:35:43 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.skyhub.de (mail.skyhub.de [78.46.96.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 117D06E203 for ; Sat, 3 Oct 2015 02:35:41 -0700 (PDT) X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1443864940; bh=fhAtff+cJd3015wCpQfpTSvRNNo+b2Mv2VOJHZmZPiY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=EXjRwQa3tUL0JEO9lZGbEnkUT6EyAkHqCdObcH jj59MLKNT/5vES0ZfbdpUequNlsYCQ8rYDaNzdf+nbsiOguPKG4JTLKBDX7JTsVxBMr CL2YILvhR5aYWkO5wgoUrYudkyiZMoVERD72n+m2v7YhXrF5RpM41JIKouiV+zLqxI= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id S4AElYkWH23m; Sat, 3 Oct 2015 11:35:39 +0200 (CEST) Received: from pd.tnic (p5DDC5507.dip0.t-ipconnect.de [93.220.85.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 87CD61DA294; Sat, 3 Oct 2015 11:35:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1443864939; bh=fhAtff+cJd3015wCpQfpTSvRNNo+b2Mv2VOJHZmZPiY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=AeDHXJJIxoAug97SBQzYxBJk2FudZXaqlxN5IQ XpEfPSuABD2H3TyeUDec1mI9HwSePBez9o+B6Bg9/W0MyG8T3Y882/lnl1IB7Sx8oRa /o0YEfKfKXlcw+n9cw8PjG/Q1ttcWUFYdxVMDPMWJyUZJ4KYLmltGi1W7mLGiqAq7A= Received: by pd.tnic (Postfix, from userid 1000) id EBC8A160379; Sat, 3 Oct 2015 11:35:38 +0200 (CEST) Date: Sat, 3 Oct 2015 11:35:38 +0200 From: Borislav Petkov To: Jiang Liu Subject: Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized Message-ID: <20151003093538.GA3786@pd.tnic> References: <20150923160621.GA3446@pd.tnic> <20150923161839.GB3446@pd.tnic> <20150926164651.GA3640@pd.tnic> <560A50DC.1040505@linux.intel.com> <20150929105138.GA12037@nazgul.tnic> <560B9323.6000309@linux.intel.com> <20150930124432.GS3036@8bytes.org> <560C153C.10600@linux.intel.com> <20150930173619.GA3826@pd.tnic> <560F8583.2010403@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <560F8583.2010403@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: lkml , Maling list - DRI developers , Bjorn Helgaas , Alex Deucher , Thomas Gleixner , Christian =?utf-8?B?S8O2bmln?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, Oct 03, 2015 at 03:36:35PM +0800, Jiang Liu wrote: > The above change is not needed, pcibios_disable_irq() will > first check !pci_has_managed_irq(dev) before actually freeing > PCI irq. pci_has_managed_irq(dev) only returns true if > pcibios_alloc_irq() succeeds. > > So to summary, I think we only need following change to fix the > regression: > int pcibios_alloc_irq(struct pci_dev *dev) > { > + if (pci_dev_msi_enabled(dev)) > + return -EBUSY; > > What do you think? Yap, that works too. I've got only this ontop of 4.3+tip: --- --- and it suspend+resumed fine. I guess it is time for Joerg to write a proper patch. :-) Thanks. diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index dc78a4a9a466..a4687aa6c1fb 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -675,6 +675,9 @@ int pcibios_add_device(struct pci_dev *dev) int pcibios_alloc_irq(struct pci_dev *dev) { + if (pci_dev_msi_enabled(dev)) + return -EBUSY; + return pcibios_enable_irq(dev); }