From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754763AbbI3RAx (ORCPT ); Wed, 30 Sep 2015 13:00:53 -0400 Received: from mga14.intel.com ([192.55.52.115]:36348 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753697AbbI3RAt (ORCPT ); Wed, 30 Sep 2015 13:00:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,613,1437462000"; d="scan'208";a="816477303" 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 To: Joerg Roedel References: <20150923072523.GB3383@phenom.ffwll.local> <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> Cc: Borislav Petkov , Daniel Vetter , Thomas Gleixner , Bjorn Helgaas , Alex Deucher , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , Maling list - DRI developers , lkml From: Jiang Liu Organization: Intel Message-ID: <560C153C.10600@linux.intel.com> Date: Thu, 1 Oct 2015 01:00:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150930124432.GS3036@8bytes.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/9/30 20:44, Joerg Roedel wrote: > On Wed, Sep 30, 2015 at 03:45:39PM +0800, Jiang Liu wrote: >> So we need to figure out why we got irq number 0 after enabling >> MSI for AMD IOMMU device. The only hint I got is that iommu driver just >> grabbing the PCI device without providing a PCI device driver for IOMMU >> PCI device, we have solved a similar case for eata driver. So could you >> please help to apply this debug patch to gather more info and send me >> /proc/interrupts? > > I think I have an idea on how dev->irq got 0 after pci_enable_msi(). The > PCI probe code calls pcibios_alloc_irq() and after a failed probe it calls > pcibios_free_irq(), which sets dev->irq to 0. > The AMD IOMMU driver does not register a pci_driver for itself, it just > doesn't make sense for it. But the PCI device containing the IOMMU gets > probed later, which fails because there is no driver for it. So the > following call to pcibios_free_irq() clears dev->irq, so that it is 0 on > the next resume. Does that make sense? 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. Thanks! Gerry