From owner-freebsd-stable@FreeBSD.ORG Sat Apr 18 19:43:22 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D8CB10656A7; Sat, 18 Apr 2009 19:43:22 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9B11C8FE33; Sat, 18 Apr 2009 19:24:43 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from phenom.cordula.ws (phenom [192.168.254.60]) by fw.farid-hajji.net (Postfix) with ESMTP id A11AA34561; Sat, 18 Apr 2009 21:24:41 +0200 (CEST) Date: Sat, 18 Apr 2009 21:24:41 +0200 From: cpghost To: Robert Noland Message-ID: <20090418192441.GB4441@phenom.cordula.ws> References: <20090418171306.GA1983@phenom.cordula.ws> <1240081119.3525.5.camel@balrog.2hip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1240081119.3525.5.camel@balrog.2hip.net> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-stable@freebsd.org Subject: Re: page fault in sis.ko / drm.ko X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2009 19:43:22 -0000 On Sat, Apr 18, 2009 at 01:58:39PM -0500, Robert Noland wrote: > On Sat, 2009-04-18 at 19:13 +0200, cpghost wrote: > > Could a drm guru please have a look at kern/133554? > > > > Thanks, > > -cpghost. > > Give this patch a try, it looks like the sis driver doesn't have irq's. Ah, thank you. I'll try this tomorrow as soon as I'm in front of this box again, and will report back. Kind regards, -cpghost. > robert. > > -- > Robert Noland > FreeBSD > Index: dev/drm/drm_drv.c > =================================================================== > --- dev/drm/drm_drv.c (revision 190987) > +++ dev/drm/drm_drv.c (working copy) > @@ -134,7 +134,7 @@ > .d_flags = D_TRACKCLOSE > }; > > -int drm_msi = 1; /* Enable by default. */ > +static int drm_msi = 1; /* Enable by default. */ > TUNABLE_INT("hw.drm.msi", &drm_msi); > > static struct drm_msi_blacklist_entry drm_msi_blacklist[] = { > @@ -228,28 +228,31 @@ > dev->pci_vendor = pci_get_vendor(dev->device); > dev->pci_device = pci_get_device(dev->device); > > - if (drm_msi && > - !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { > - msicount = pci_msi_count(dev->device); > - DRM_DEBUG("MSI count = %d\n", msicount); > - if (msicount > 1) > - msicount = 1; > + if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) { > + if (drm_msi && > + !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { > + msicount = pci_msi_count(dev->device); > + DRM_DEBUG("MSI count = %d\n", msicount); > + if (msicount > 1) > + msicount = 1; > > - if (pci_alloc_msi(dev->device, &msicount) == 0) { > - DRM_INFO("MSI enabled %d message(s)\n", msicount); > - dev->msi_enabled = 1; > - dev->irqrid = 1; > + if (pci_alloc_msi(dev->device, &msicount) == 0) { > + DRM_INFO("MSI enabled %d message(s)\n", > + msicount); > + dev->msi_enabled = 1; > + dev->irqrid = 1; > + } > } > - } > > - dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ, > - &dev->irqrid, RF_SHAREABLE); > - if (!dev->irqr) { > - return ENOENT; > + dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ, > + &dev->irqrid, RF_SHAREABLE); > + if (!dev->irqr) { > + return ENOENT; > + } > + > + dev->irq = (int) rman_get_start(dev->irqr); > } > > - dev->irq = (int) rman_get_start(dev->irqr); > - > mtx_init(&dev->dev_lock, "drmdev", NULL, MTX_DEF); > mtx_init(&dev->irq_lock, "drmirq", NULL, MTX_DEF); > mtx_init(&dev->vbl_lock, "drmvbl", NULL, MTX_DEF); -- Cordula's Web. http://www.cordula.ws/