Hi, 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. HTH, -- Colin Random BOFH excuse: Your packets were eaten by the terminator
? linux/drm/kernel/.mach64.ko.cmd ? linux/drm/kernel/.mach64.mod.o.cmd ? linux/drm/kernel/.mach64.o.cmd ? linux/drm/kernel/.mach64_dma.o.cmd ? linux/drm/kernel/.mach64_drv.o.cmd ? linux/drm/kernel/.mach64_irq.o.cmd ? linux/drm/kernel/.mach64_state.o.cmd ? linux/drm/kernel/diffs ? linux/drm/kernel/mach64.ko ? linux/drm/kernel/mach64.mod.c 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> @@ -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)