From patchwork Wed Sep 30 17:36:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 7301161 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 EFB7EBEEA4 for ; Wed, 30 Sep 2015 17:36:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 255D620628 for ; Wed, 30 Sep 2015 17:36:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E7FE820689 for ; Wed, 30 Sep 2015 17:36:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6898D6E188; Wed, 30 Sep 2015 10:36:25 -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 40D1C6E188 for ; Wed, 30 Sep 2015 10:36:24 -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=1443634582; bh=NYTtq6ZiKdcMGr9UgDFi6jA3xxvgTBK6/isH81MNqRo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=VgY9vMkoGh6a/bgNOS4igqJkHe9yggBy1aEcAX ktqPhCcjbExOr0VjbbDnfmUEGDYCA5pBaulaqNIEPwwnSdbQb8uDOzU495/lPUvdC8G YNp45h6uYdZu4rXstgmNrwH0KWoDBtG8iLHAtLAhXz/ltO9+WaqaiOLtjjIn+H/N7g= 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 xreCT9j5u+a3; Wed, 30 Sep 2015 19:36:22 +0200 (CEST) Received: from pd.tnic (p5DDC7E54.dip0.t-ipconnect.de [93.220.126.84]) (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 DAF0A1DA282; Wed, 30 Sep 2015 19:36:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1443634582; bh=NYTtq6ZiKdcMGr9UgDFi6jA3xxvgTBK6/isH81MNqRo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=VgY9vMkoGh6a/bgNOS4igqJkHe9yggBy1aEcAX ktqPhCcjbExOr0VjbbDnfmUEGDYCA5pBaulaqNIEPwwnSdbQb8uDOzU495/lPUvdC8G YNp45h6uYdZu4rXstgmNrwH0KWoDBtG8iLHAtLAhXz/ltO9+WaqaiOLtjjIn+H/N7g= Received: by pd.tnic (Postfix, from userid 1000) id A2692160BA4; Wed, 30 Sep 2015 19:36:19 +0200 (CEST) Date: Wed, 30 Sep 2015 19:36:19 +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: <20150930173619.GA3826@pd.tnic> References: <20150923085950.GA3440@pd.tnic> <20150923144450.GD3383@phenom.ffwll.local> <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <560C153C.10600@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 Thu, Oct 01, 2015 at 01:00:44AM +0800, Jiang Liu wrote: > Thanks Joerg, that makes sense. If some driver tries to binding to > the IOMMU device, it will trigger the scenario as you described. For > example, Xen backend driver will try to probe all PCI devices if > enabled. I will do more investigation tomorrow. Right, so this fixes the issue on my box, courtesy of Joerg. WE basically don't disable the IRQ on MSI-enabled devices. The AMD IOMMU uses a barebones PCI device but not a PCI driver, which would be an overkill. diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 09d3afc..29ec2eb 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -674,12 +674,15 @@ int pcibios_add_device(struct pci_dev *dev) int pcibios_alloc_irq(struct pci_dev *dev) { + if (pci_dev_msi_enabled(dev)) + return 0; + return pcibios_enable_irq(dev); } void pcibios_free_irq(struct pci_dev *dev) { - if (pcibios_disable_irq) + if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq) pcibios_disable_irq(dev); } --