[ewg] Re: Compile error on 7/14 daily build of OFED-1.5

Jack Morgenstein jackm at dev.mellanox.co.il
Mon Jul 27 04:29:01 PDT 2009


Jon,
Please investigate this -- you added the asm/bitops.h backport file
in your commit:
commit 3ff95fad45ee5aca5caf6bd78f9bf8c75e424d82
Author: Jon Mason <jon at opengridcomputing.com>
Date:   Wed Jul 1 18:13:16 2009 +0300

    NFSRDMA: NFS backport for RHEL5.3
    This patch provides the NFS backport for RHEL5.3.
    It passes Connectathon as a client and server over TCP and RDMA.

    Signed-Off-By: Jon Mason <jon at opengridcomputing.com>

diff --git a/kernel_addons/backport/2.6.18-EL5.3/include/asm/bitops.h b/kernel_addons/backport/2.6.18-EL5.3/include/asm/bitops.h
new file mode 100644
index 0000000..9222256
--- /dev/null
+++ b/kernel_addons/backport/2.6.18-EL5.3/include/asm/bitops.h
@@ -0,0 +1,15 @@
+#ifndef BACKPORT_ASM_BITOPS_H
+#define BACKPORT_ASM_BITOPS_H
+
+#include_next <asm/bitops.h>
+#if defined(__ia64__)
+#include <asm/system.h>
+#endif
+
+static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *addr)
+{
+       smp_mb__before_clear_bit();
+       clear_bit(nr, addr);
+}
+
+#endif
.....

I'm a bit nervous about Woody's fix (as he is, too), because
his fix duplicates definitions found elsewhere, and this may
cause problems if the other file containing the definitions
is also included in some app.

Any suggestions?

Thanks!
-Jack

On Thursday 23 July 2009 23:12, Woodruff, Robert J wrote:
> 
> This compile error still exists in today's daily build.
> I did a little investigation and it looks like it is 
> an include file search order problem. It looks like the
> include file <asm/system.h> was added to bitops.h for ia64 
> for a backport for addr.c, however with this, it causes
> the compile problem in kobject_backport.c . 
> I was able to work around the problem with the following changes
> to bitops.h, but I am not sure this is the best way to fix it.
> 
> 
> 
> #ifndef BACKPORT_ASM_BITOPS_H
> #define BACKPORT_ASM_BITOPS_H
> 
> #include_next <asm/bitops.h>
> #if defined(__ia64__)
> /* #include <asm/system.h> */   <- causes a compile problem in kobject_backport.c
> 
> #define mb() ia64_mf()   <--- if I only add the defines that are needed from system.h instead
> #ifdef CONFIG_SMP             everything seems to compile and run OK. 
> #define smp_mb() mb()
> #else
> #define smp_mb() barrier()
> #endif
> 
> #endif
> 
> static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *addr)
> {
>         smp_mb__before_clear_bit();
>         clear_bit(nr, addr);
> }
> 
> #endif
> ~                                                                               
> 
> -----Original Message-----
> From: Tziporet Koren [mailto:tziporet at dev.mellanox.co.il] 
> Sent: Thursday, July 16, 2009 7:24 AM
> To: tziporet at dev.mellanox.co.il
> Cc: Woodruff, Robert J; EWG
> Subject: Re: Compile error on 7/14 daily build of OFED-1.5
> 
> Tziporet Koren wrote:
> > Woodruff, Robert J wrote:
> >> I am seeing this build error when trying to compile
> >> the 7/14 daily build on EL 5.3 on IA64. Not sure who the maintainer 
> >> is of kobject_backport.c,
> >> but it looks to be the culprit.
> >>
> >> woody
> >>
> >>
> >> ckport/2.6.18-EL5.3/include/linux/slab.h:1,
> >>                  from 
> >> /var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5/drivers/infiniband/core/kobject_backport.c:1: 
> >>
> >> include/linux/bitops.h: At top level:
> >> include/linux/bitops.h:57: error: conflicting types for 'fls_long'
> >> /var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5/kernel_addons/backport/2.6.18-EL5.3/include/linux/log2.h:64: 
> >> error: previous implicit declaration of 'fls_long' was here
> >> make[4]: *** 
> >> [/var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5/drivers/infiniband/core/kobject_backport.o] 
> >> Error 1
> >>   
> > There is no specific owner to the backports
> > If you have any fix please send it.
> > Otherwise we will try to look into it next week
> >
> > Tziporet
> >
> I see Jack just fixed it
> 
> Tziporet
> 



More information about the ewg mailing list