From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754406AbbI3RgZ (ORCPT ); Wed, 30 Sep 2015 13:36:25 -0400 Received: from mail.skyhub.de ([78.46.96.112]:35669 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753163AbbI3RgX (ORCPT ); Wed, 30 Sep 2015 13:36:23 -0400 Date: Wed, 30 Sep 2015 19:36:19 +0200 From: Borislav Petkov To: Jiang Liu Cc: Joerg Roedel , Daniel Vetter , Thomas Gleixner , Bjorn Helgaas , Alex Deucher , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Maling list - DRI developers , lkml 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-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <560C153C.10600@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } -- -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.