Re: PUD again

On 23/11/05 11:07, SA wrote:
> Dear comedi list,
> 
> Sorry to bother you with this,  I have just tried to compile the CVS version 
> of comedi and got this error (below).  I am compiling on an SMP machine - it 
> seemed to compile on a more or less identical single processor machine 
> (alhtough this had the PUD error when I used the tar'd version but this was 
> fixed by using the CVS version).
> 
> Anyone got a quick fix? I thought this had already been dealt within the 
> mainstream release so maybe i am doing something dim...

I think there are two problems.  One has been fixed in CVS today (by 
Frank).  The other hasn't been fixed yet.  Try the patch at the end of 
this email.

[Duane, if you're reading this, it might help with your Gentoo 2.6.11 
kernel too!]

> In file included 
> from /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/kobject.h:24,
>                  
> from /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/module.h:19,
>                  from ../include/linux/module.h:19,
>                  from comedi_fops.c:27:
> .../include/linux/kref.h: In function `KREF_PUT':
> .../include/linux/kref.h:101: error: void value not ignored as it ought to be

This one should be fixed in CVS.

> In file included from ../include/asm/pgtable.h:29,
>                  
> from /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/mm.h:36,
>                  from ../include/linux/mm.h:10,
>                  from comedi_fops.c:34:
> /lib/modules/2.6.11-1.27_FC3smp/build/include/asm/pgtable.h: In function 
> `set_pud':
> /lib/modules/2.6.11-1.27_FC3smp/build/include/asm/pgtable.h:84: error: 
> structure has no member named `pud'
> /lib/modules/2.6.11-1.27_FC3smp/build/include/asm/pgtable.h:84: error: 
> structure has no member named `pud'
> /lib/modules/2.6.11-1.27_FC3smp/build/include/asm/pgtable.h: In function 
> `pud_bad':
> /lib/modules/2.6.11-1.27_FC3smp/build/include/asm/pgtable.h:219: error: 
> structure has no member named `pud'
> In file included from ../include/asm/pgtable.h:29,
>                  
> from /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/mm.h:36,
>                  from ../include/linux/mm.h:10,
>                  from comedi_fops.c:34:
> /lib/modules/2.6.11-1.27_FC3smp/build/include/asm/pgtable.h:314:1: warning: 
> "pud_offset" redefined
> In file included 
> from /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/mm.h:36,
>                  from ../include/linux/mm.h:10,
>                  from comedi_fops.c:34:
> .../include/asm/pgtable.h:26:1: warning: this is the location of the previous 
> definition
> In file included from ../include/linux/mm.h:10,
>                  from comedi_fops.c:34:
> /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/mm.h: In function 
> `pmd_alloc':
> /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/mm.h:678: error: structure 
> has no member named `pud'
> /lib/modules/2.6.11-1.27_FC3smp/build/include/linux/mm.h:680: error: structure 
> has no member named `pud'

I think the following patch might help, but I don't have a 2.6.11 kernel 
installed right now to test it.  I'm pretty sure the pud stuff was added 
  in 2.6.11 though, not 2.6.12 as the compatibility header currently 
indicates.

Index: include/asm/pgtable.h
===================================================================
RCS file: /var/cvs/comedi/include/asm/pgtable.h,v
retrieving revision 1.3
diff -u -r1.3 pgtable.h
--- include/asm/pgtable.h	6 Oct 2005 17:42:06 -0000	1.3
+++ include/asm/pgtable.h	23 Nov 2005 15:02:20 -0000
_at__at_ -21,7 +21,7 _at__at_

  #include <linux/version.h>

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
  #define pud_t pgd_t
  #define pud_offset(pgd, start)	(pgd)
  #endif

Received on 2005-11-23Z15:07:14