Re: [PATCH] BRe: mmapr.c compile problem
On Fri, 8 Apr 2005, Jeff Chua wrote: On Thu, 7 Apr 2005, Marc Aurele La France wrote: I've just committed a change to fix the typo you reported and #define LINUX_MOD_DEVICETABLE_H where apprpriate. Just downloaded and verified that both mmapr.c and mmapw.c compiled ok. I like your way of #define LINUX_MOD_DEVICETABLE_H. Thanks. I did it that way because not only does this solution mitigate the problem, but it also points directly at where the problem really lies, should any kernelite care to fix it. Marc. +--+---+ | Marc Aurele La France | work: 1-780-492-9310 | | Computing and Network Services | fax:1-780-492-1729 | | 352 General Services Building | email: [EMAIL PROTECTED] | | University of Alberta +---+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply| | CANADA | | +--+---+ XFree86 developer and VP. ATI driver and X server internals. ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: [PATCH] BRe: mmapr.c compile problem
On Thu, 7 Apr 2005, Marc Aurele La France wrote: I've just committed a change to fix the typo you reported and #define LINUX_MOD_DEVICETABLE_H where apprpriate. Just downloaded and verified that both mmapr.c and mmapw.c compiled ok. I like your way of #define LINUX_MOD_DEVICETABLE_H. Thanks, Jeff. ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: [PATCH] BRe: mmapr.c compile problem
On Tue, 5 Apr 2005, Marc Aurele La France wrote: On Tue, 5 Apr 2005, Marc Aurele La France wrote: On Tue, 5 Apr 2005, Jeff Chua wrote: Here's a patch to fix mmapr.c and mmapw.c so that compile under linux. Thanks, Jeff. [ jchua AT fedex DOT com ] [elided] I agree with the typo fix (blush), but not with the removal of 's inclusion. Instead try cd /xc/programs/Xserver/hw/xfree86/etc touch mmap?.c make EXTRA_DEFINES=-DLINUX_MOD_DEVICETABLE_H mmapr mmapw If this works (and it does for me), then this is a kernel bug, introduced in 2.5.62. Report it there. should only #include when __KERNEL__ is #define'd. In the meantime, the work-around for mmap?.c would be to #define LINUX_MOD_DEVICETABLE_H before #include , but that might cause other issues later on. FWIW, this problem also shows up in linuxPci.c on alpha and sparc64. I've just committed a change to fix the typo you reported and #define LINUX_MOD_DEVICETABLE_H where apprpriate. Thanks. Marc. +--+---+ | Marc Aurele La France | work: 1-780-492-9310 | | Computing and Network Services | fax:1-780-492-1729 | | 352 General Services Building | email: [EMAIL PROTECTED] | | University of Alberta +---+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply| | CANADA | | +--+---+ XFree86 developer and VP. ATI driver and X server internals. ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: [PATCH] BRe: mmapr.c compile problem
On Tue, 5 Apr 2005, Marc Aurele La France wrote: On Tue, 5 Apr 2005, Jeff Chua wrote: Here's a patch to fix mmapr.c and mmapw.c so that compile under linux. Thanks, Jeff. [ jchua AT fedex DOT com ] --- xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapr.c.org Tue Apr 5 13:58:21 2005 +++ xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapr.c Tue Apr 5 14:01:16 2005 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/mmapr.c,v 1.11 2005/03/29 18:41:45 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/mmapr.c,v 1.10 2004/12/31 16:07:09 tsi Exp $ */ /* * Copyright 2002 through 2005 by Marc Aurele La France (TSI @ UQV), [EMAIL PROTECTED] * @@ -51,12 +51,11 @@ #endif #ifdef linux -# include -# include +#include # ifndef PCIIOC_BASE /* Selected ioctls for /proc/bus/pci// nodes */ -# define PCIIOC_BASE (('P') << 24) | ('C' << 16) | ('I' << 8)) +# define PCIIOC_BASE (('P' << 24) | ('C' << 16) | ('I' << 8)) /* Set mmap state to I/O space */ # define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) @@ -159,6 +158,7 @@ case 'q': Size = sizeof(dataq); break; + #ifdef linux case 'i': mmap_ioctl = PCIIOC_MMAP_IS_IO; @@ -168,6 +168,7 @@ mmap_ioctl = PCIIOC_MMAP_IS_MEM; break; #endif + default: usage(); } --- /v6/src2/xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapw.c.org Tue Apr 5 13:21:33 2005 +++ /v6/src2/xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapw.c Tue Apr 5 14:02:43 2005 @@ -51,7 +51,6 @@ #ifdef linux # include -# include # ifndef PCIIOC_BASE /* Selected ioctls for /proc/bus/pci// nodes */ I agree with the typo fix (blush), but not with the removal of 's inclusion. Instead try cd /xc/programs/Xserver/hw/xfree86/etc touch mmap?.c make EXTRA_DEFINES=-DLINUX_MOD_DEVICETABLE_H mmapr mmapw If this works (and it does for me), then this is a kernel bug, introduced in 2.5.62. Report it there. should only #include when __KERNEL__ is #define'd. In the meantime, the work-around for mmap?.c would be to #define LINUX_MOD_DEVICETABLE_H before #include , but that might cause other issues later on. FWIW, this problem also shows up in linuxPci.c on alpha and sparc64. Marc. +--+---+ | Marc Aurele La France | work: 1-780-492-9310 | | Computing and Network Services | fax:1-780-492-1729 | | 352 General Services Building | email: [EMAIL PROTECTED] | | University of Alberta +---+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply| | CANADA | | +--+---+ XFree86 developer and VP. ATI driver and X server internals. ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: [PATCH] BRe: mmapr.c compile problem
On Tue, 5 Apr 2005, Jeff Chua wrote: Here's a patch to fix mmapr.c and mmapw.c so that compile under linux. Thanks, Jeff. [ jchua AT fedex DOT com ] --- xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapr.c.org Tue Apr 5 13:58:21 2005 +++ xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapr.c Tue Apr 5 14:01:16 2005 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/mmapr.c,v 1.11 2005/03/29 18:41:45 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/mmapr.c,v 1.10 2004/12/31 16:07:09 tsi Exp $ */ /* * Copyright 2002 through 2005 by Marc Aurele La France (TSI @ UQV), [EMAIL PROTECTED] * @@ -51,12 +51,11 @@ #endif #ifdef linux -# include -# include +#include # ifndef PCIIOC_BASE /* Selected ioctls for /proc/bus/pci// nodes */ -# define PCIIOC_BASE (('P') << 24) | ('C' << 16) | ('I' << 8)) +# define PCIIOC_BASE (('P' << 24) | ('C' << 16) | ('I' << 8)) /* Set mmap state to I/O space */ # define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) @@ -159,6 +158,7 @@ case 'q': Size = sizeof(dataq); break; + #ifdef linux case 'i': mmap_ioctl = PCIIOC_MMAP_IS_IO; @@ -168,6 +168,7 @@ mmap_ioctl = PCIIOC_MMAP_IS_MEM; break; #endif + default: usage(); } --- /v6/src2/xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapw.c.org Tue Apr 5 13:21:33 2005 +++ /v6/src2/xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapw.c Tue Apr 5 14:02:43 2005 @@ -51,7 +51,6 @@ #ifdef linux # include -# include # ifndef PCIIOC_BASE /* Selected ioctls for /proc/bus/pci// nodes */ I agree with the typo fix (blush), but not with the removal of 's inclusion. Instead try cd /xc/programs/Xserver/hw/xfree86/etc touch mmap?.c make EXTRA_DEFINES=-DLINUX_MOD_DEVICETABLE_H mmapr mmapw If this works (and it does for me), then this is a kernel bug, introduced in 2.5.62. Report it there. should only #include when __KERNEL__ is #define'd. In the meantime, the work-around for mmap?.c would be to #define LINUX_MOD_DEVICETABLE_H before #include , but that might cause other issues later on. Marc. +--+---+ | Marc Aurele La France | work: 1-780-492-9310 | | Computing and Network Services | fax:1-780-492-1729 | | 352 General Services Building | email: [EMAIL PROTECTED] | | University of Alberta +---+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply| | CANADA | | +--+---+ XFree86 developer and VP. ATI driver and X server internals. ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
[PATCH] BRe: mmapr.c compile problem
Here's a patch to fix mmapr.c and mmapw.c so that compile under linux. Thanks, Jeff. [ jchua AT fedex DOT com ] --- xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapr.c.org Tue Apr 5 13:58:21 2005 +++ xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapr.c Tue Apr 5 14:01:16 2005 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/mmapr.c,v 1.11 2005/03/29 18:41:45 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/mmapr.c,v 1.10 2004/12/31 16:07:09 tsi Exp $ */ /* * Copyright 2002 through 2005 by Marc Aurele La France (TSI @ UQV), [EMAIL PROTECTED] * @@ -51,12 +51,11 @@ #endif #ifdef linux -# include -# include +#include # ifndef PCIIOC_BASE /* Selected ioctls for /proc/bus/pci// nodes */ -# define PCIIOC_BASE (('P') << 24) | ('C' << 16) | ('I' << 8)) +# define PCIIOC_BASE (('P' << 24) | ('C' << 16) | ('I' << 8)) /* Set mmap state to I/O space */ # define PCIIOC_MMAP_IS_IO(PCIIOC_BASE | 0x01) @@ -159,6 +158,7 @@ case 'q': Size = sizeof(dataq); break; + #ifdef linux case 'i': mmap_ioctl = PCIIOC_MMAP_IS_IO; @@ -168,6 +168,7 @@ mmap_ioctl = PCIIOC_MMAP_IS_MEM; break; #endif + default: usage(); } --- /v6/src2/xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapw.c.org Tue Apr 5 13:21:33 2005 +++ /v6/src2/xfree86/xc/programs/Xserver/hw/xfree86/etc/mmapw.c Tue Apr 5 14:02:43 2005 @@ -51,7 +51,6 @@ #ifdef linux # include -# include # ifndef PCIIOC_BASE /* Selected ioctls for /proc/bus/pci// nodes */ ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel