On Mon, 2003-06-30 at 16:58, Colin Leroy wrote: > > this patch fixes compilation of mach64 kernel module for kernel 2.5. > (module will be named mach64.ko for these kernels). > > apply with -p0 in xc/programs/Xserver/hw/xfree86/os-support.
[...] > Index: linux/drm/kernel/drmP.h > =================================================================== > RCS file: > /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v > retrieving revision 1.56.2.6 > diff -u -u -r1.56.2.6 drmP.h > --- linux/drm/kernel/drmP.h 30 Apr 2003 16:07:21 > -0000 1.56.2.6 > +++ linux/drm/kernel/drmP.h 30 Jun 2003 14:39:07 -0000 > @@ -48,8 +48,12 @@ > #include <linux/init.h> > #include <linux/file.h> > #include <linux/pci.h> > -#include <linux/wrapper.h> > #include <linux/version.h> > + > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,1) > +#include <linux/wrapper.h> > +#endif > + > #include <linux/sched.h> > #include <linux/smp_lock.h> /* For (un)lock_kernel */ > #include <linux/mm.h> What's this for? The linux/wrapper.h header seems to have been around since 2.2 at least. > @@ -797,8 +801,13 @@ > unsigned int cmd, unsigned long arg > ); > extern int DRM(irq_install)( drm_device_t *dev, int irq ); > extern int DRM(irq_uninstall)( drm_device_t *dev ); > -extern void DRM(dma_service)( int irq, void *device, > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,1) > +extern void DRM(dma_service)( int irq, void *device, > + struct pt_regs *regs ); > +#else > +extern irqreturn_t DRM(dma_service)( int irq, void *device, > struct pt_regs *regs ); > +#endif > extern void DRM(driver_irq_preinstall)( drm_device_t *dev ); > extern void DRM(driver_irq_postinstall)( drm_device_t *dev > ); > extern void DRM(driver_irq_uninstall)( drm_device_t *dev ); > Index: shared/drm/kernel/mach64_irq.c > =================================================================== > RCS file: > /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/Attic/mach64_irq.c,v > retrieving revision 1.1.2.2 > diff -u -u -r1.1.2.2 mach64_irq.c > --- shared/drm/kernel/mach64_irq.c 27 Apr 2003 17:57:25 > -0000 1.1.2.2 > +++ shared/drm/kernel/mach64_irq.c 30 Jun 2003 14:39:55 -0000 > @@ -40,7 +40,11 @@ > #include "mach64_drm.h" > #include "mach64_drv.h" > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,1) > void DRM(dma_service)( DRM_IRQ_ARGS ) > +#else > +irqreturn_t DRM(dma_service)( DRM_IRQ_ARGS ) > +#endif > { > drm_device_t *dev = (drm_device_t *) arg; > drm_mach64_private_t *dev_priv = > @@ -65,6 +69,11 @@ > DRM_WAKEUP(&dev->vbl_queue); > DRM(vbl_send_signals)( dev ); > } > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,1) > + return; > +#else > + return IRQ_HANDLED; > +#endif > } > > int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) > These version comparisons aren't correct, the interrupt handling code was only changed very recently, around 2.5.70 IIRC. Also, you always return IRQ_HANDLED, even if you weren't interested in the interrupt at all and didn't do anything about it. You should move the return IRQ_HANDLED into the if block and return IRQ_NONE at the end of the function (and drop the superfluous return for older kernels). -- Earthling Michel Dänzer \ Debian (powerpc), XFree86 and DRI developer Software libre enthusiast \ http://svcs.affero.net/rm.php?r=daenzer ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel