Re: [patch] s390: missing ifdef in bitops.h

From: Arnd Bergmann
Date: Tue Jun 13 2006 - 16:31:58 EST


Am Tuesday 13 June 2006 17:17 schrieb David Woodhouse:
> -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
> +#ifdef __KERNEL__
> Â
> Â#ifndef _S390_BITOPS_H
> Â#include <asm/bitops.h>
> @@ -94,6 +94,6 @@ #define __FD_ISSET(fd,fdsetp) Âtest_bit(
> Â#undef Â__FD_ZERO
> Â#define __FD_ZERO(fdsetp) (memset ((fdsetp), 0, sizeof(*(fd_set
> *)(fdsetp))))
> -#endif   /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ <
> 2)*/ +#endif   /* __KERNEL__ */
> Â

Erm, I don't think the kernel even uses those definitions, the only reason
to keep them is old user space.

Now that is true for all architectures, although they all handle things
slightly differently:

cris, v850, s390: use bitops, which can be considered broken
arm, arm26, frv, h8300, m68k: use a trivial C macro
i386: has an inline assembly
sparc64, x86_64, alpha, xtensa, sparc, ia64, powerpc, sh, parisc, mips:
use variations of the same unrolled C inline functions

I'd suggest using only one version. In doubt, I would move the parisc
version to asm-generic/fd_set.h or similar and include that from
everywhere.

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/