All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Cedric Le Goater <clg@fr.ibm.com>
Subject: Re: [patch] s390: missing ifdef in bitops.h
Date: Wed, 14 Jun 2006 10:57:11 +0200	[thread overview]
Message-ID: <1150275431.6461.6.camel@localhost> (raw)
In-Reply-To: <1150211828.2844.20.camel@hades.cambridge.redhat.com>

On Tue, 2006-06-13 at 16:17 +0100, David Woodhouse wrote:
> On Tue, 2006-06-13 at 14:09 +0200, Heiko Carstens wrote:
> > Add missing #ifdef __KERNEL__ to asm-s390/bitops.h
> 
> But asm/bitops.h isn't suitable for userspace _anyway_, is it?
> We should be able to drop all instances of __KERNEL__ from it.

Nothing from asm/bitops.h should ever be used in userspace.

> Which means that asm-s390/posix_types.h probably ought never to be
> trying to include asm/bitops.h in the !__KERNEL__ case... we never had
> libc5 on S390 anyway, did we?

Correct. And the depedency to bitops.h in case of __KERNEL__ = 1 should
not be there either, in particular since __FD_SET/__FD_CLR do not have
to be atomic. A simple piece of C code should be used instead of
set_bit/clear_bit. 

> Martin, is it OK for me to add this to the hdrcleanup-2.6.git tree?
> 
> diff --git a/include/asm-s390/posix_types.h b/include/asm-s390/posix_types.h
> index 61788de..18344dc 100644
> --- a/include/asm-s390/posix_types.h
> +++ b/include/asm-s390/posix_types.h
> @@ -76,7 +76,7 @@ #endif                       /* !defined
>  } __kernel_fsid_t;
>  
> 
> -#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__ */
>  
>  #endif

It should not hurt. s390 always used a glibc with a major >= 2.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.



      parent reply	other threads:[~2006-06-14  8:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 12:09 [patch] s390: missing ifdef in bitops.h Heiko Carstens
2006-06-13 15:17 ` David Woodhouse
2006-06-13 20:33   ` Arnd Bergmann
2006-06-13 20:39     ` David Woodhouse
2006-06-14  5:14       ` Heiko Carstens
2006-06-13 20:43     ` Arnd Bergmann
2006-06-14 10:50       ` Martin Schwidefsky
2006-06-14 13:04         ` David Woodhouse
2006-06-14 13:06           ` Martin Schwidefsky
2006-06-14  8:57   ` Martin Schwidefsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1150275431.6461.6.camel@localhost \
    --to=schwidefsky@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=clg@fr.ibm.com \
    --cc=dwmw2@infradead.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.