lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Oct 2006 09:54:07 +1000
From:	"Dave Airlie" <airlied@...il.com>
To:	"Frederik Deweerdt" <deweerdt@...e.fr>
Cc:	"Arjan van de Ven" <arjan@...radead.org>,
	"Matthew Wilcox" <matthew@....cx>, linux-scsi@...r.kernel.org,
	"Linux-Kernel," <linux-kernel@...r.kernel.org>,
	"J.A. Magall??n" <jamagallon@....com>,
	"Alan Cox" <alan@...rguk.ukuu.org.uk>,
	"Andrew Morton" <akpm@...l.org>, "Jeff Garzik" <jeff@...zik.org>
Subject: Re: [RFC PATCH] move drm to pci_request_irq

On 10/3/06, Frederik Deweerdt <deweerdt@...e.fr> wrote:
> Hi,
>
> This proof-of-concept patch converts the drm driver to use the
> pci_request_irq() function.

NAK.
Wow nice CC'list and no DRM maintainer in sight :-)

This will break framebuffer drivers, the DRM is not a proper PCI
device driver as we don't have PCI device sharing, take a look at the
gpu-2.6.git tree on kernel.org for the "correct" solution, which needs
more attention before merging..

Dave.
>
> Regards,
> Frederik
>
>
>
> diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
> index b366c5b..5b000cd 100644
> --- a/drivers/char/drm/drm_drv.c
> +++ b/drivers/char/drm/drm_drv.c
> @@ -234,6 +234,8 @@ int drm_lastclose(drm_device_t * dev)
>         }
>         mutex_unlock(&dev->struct_mutex);
>
> +       pci_set_drvdata(dev, NULL);
> +
>         DRM_DEBUG("lastclose completed\n");
>         return 0;
>  }
> diff --git a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c
> index 4553a3a..5dd12cb 100644
> --- a/drivers/char/drm/drm_irq.c
> +++ b/drivers/char/drm/drm_irq.c
> @@ -132,8 +132,10 @@ static int drm_irq_install(drm_device_t
>         if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
>                 sh_flags = IRQF_SHARED;
>
> -       ret = request_irq(dev->irq, dev->driver->irq_handler,
> -                         sh_flags, dev->devname, dev);
> +       pci_set_drvdata(dev->pdev, dev);
> +
> +       ret = pci_request_irq(dev->pdev, dev->driver->irq_handler,
> +                         sh_flags, dev->devname);
>         if (ret < 0) {
>                 mutex_lock(&dev->struct_mutex);
>                 dev->irq_enabled = 0;
> @@ -173,7 +175,7 @@ int drm_irq_uninstall(drm_device_t * dev
>
>         dev->driver->irq_uninstall(dev);
>
> -       free_irq(dev->irq, dev);
> +       pci_free_irq(dev->pdev);
>
>         return 0;
>  }
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ