linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h>
       [not found] <1385369734-24893-1-git-send-email-geert@linux-m68k.org>
@ 2013-11-25  8:55 ` Geert Uytterhoeven
  2013-11-25  9:55   ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2013-11-25  8:55 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arch
  Cc: linux-kernel, Geert Uytterhoeven, James E.J. Bottomley,
	Helge Deller, linux-parisc

Uapi <asm-generic/types.h> just includes <asm-generic/int-ll64.h>

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
---
 arch/parisc/include/uapi/asm/Kbuild  |    3 ++-
 arch/parisc/include/uapi/asm/types.h |    6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)
 delete mode 100644 arch/parisc/include/uapi/asm/types.h

diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index a580642555b6..e0da93254186 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += bitsperlong.h
 header-y += byteorder.h
 header-y += errno.h
@@ -27,5 +29,4 @@ header-y += statfs.h
 header-y += swab.h
 header-y += termbits.h
 header-y += termios.h
-header-y += types.h
 header-y += unistd.h
diff --git a/arch/parisc/include/uapi/asm/types.h b/arch/parisc/include/uapi/asm/types.h
deleted file mode 100644
index 8866f9bbdeaf..000000000000
--- a/arch/parisc/include/uapi/asm/types.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _PARISC_TYPES_H
-#define _PARISC_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h>
  2013-11-25  8:55 ` [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h> Geert Uytterhoeven
@ 2013-11-25  9:55   ` James Bottomley
  2013-11-25 10:12     ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2013-11-25  9:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, linux-arch, linux-kernel, James E.J. Bottomley,
	Helge Deller, linux-parisc

On Mon, 2013-11-25 at 09:55 +0100, Geert Uytterhoeven wrote:
> Uapi <asm-generic/types.h> just includes <asm-generic/int-ll64.h>

This really doesn't look like a good idea:  Firstly the default of
asm-generic/types.h should *not* be int-ll64, because that's for 32 bit
only and most processors are moving towards 64 bit.  Secondly parisc
currently only has a 32 bit userspace, which is why the file is a simple
include of int-ll64.h; however, people are working on 64 bit userspace
(albeit very slowly) and that file would then have to change.  If we
take the file away someone will forget to add the changed file back.

James


> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-parisc@vger.kernel.org
> ---
>  arch/parisc/include/uapi/asm/Kbuild  |    3 ++-
>  arch/parisc/include/uapi/asm/types.h |    6 ------
>  2 files changed, 2 insertions(+), 7 deletions(-)
>  delete mode 100644 arch/parisc/include/uapi/asm/types.h
> 
> diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
> index a580642555b6..e0da93254186 100644
> --- a/arch/parisc/include/uapi/asm/Kbuild
> +++ b/arch/parisc/include/uapi/asm/Kbuild
> @@ -1,6 +1,8 @@
>  # UAPI Header export list
>  include include/uapi/asm-generic/Kbuild.asm
>  
> +generic-y += types.h
> +
>  header-y += bitsperlong.h
>  header-y += byteorder.h
>  header-y += errno.h
> @@ -27,5 +29,4 @@ header-y += statfs.h
>  header-y += swab.h
>  header-y += termbits.h
>  header-y += termios.h
> -header-y += types.h
>  header-y += unistd.h
> diff --git a/arch/parisc/include/uapi/asm/types.h b/arch/parisc/include/uapi/asm/types.h
> deleted file mode 100644
> index 8866f9bbdeaf..000000000000
> --- a/arch/parisc/include/uapi/asm/types.h
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -#ifndef _PARISC_TYPES_H
> -#define _PARISC_TYPES_H
> -
> -#include <asm-generic/int-ll64.h>
> -
> -#endif

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h>
  2013-11-25  9:55   ` James Bottomley
@ 2013-11-25 10:12     ` Geert Uytterhoeven
  2013-11-25 10:22       ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2013-11-25 10:12 UTC (permalink / raw)
  To: James Bottomley
  Cc: Arnd Bergmann, Linux-Arch, linux-kernel@vger.kernel.org,
	James E.J. Bottomley, Helge Deller, Parisc List

On Mon, Nov 25, 2013 at 10:55 AM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Mon, 2013-11-25 at 09:55 +0100, Geert Uytterhoeven wrote:
>> Uapi <asm-generic/types.h> just includes <asm-generic/int-ll64.h>
>
> This really doesn't look like a good idea:  Firstly the default of
> asm-generic/types.h should *not* be int-ll64, because that's for 32 bit
> only and most processors are moving towards 64 bit.  Secondly parisc

In kernelspace, both 32 and 64 bit are ll64.

> currently only has a 32 bit userspace, which is why the file is a simple
> include of int-ll64.h; however, people are working on 64 bit userspace

Sorry, I didn't know you support 32 bit userspace only.

> (albeit very slowly) and that file would then have to change.  If we
> take the file away someone will forget to add the changed file back.

However, is this a "new" 64 bit userspace ABI? If yes, you may want to
consider using ll64 in userspace on 64 bit too, like all "new" 64 bit ports
do (arm64, s390, sparc, tile, x86). Only legacy alpha, ia64, mips and
old ppc use l64.

Or follow the ppc64 road:

/*
 * This is here because we used to use l64 for 64bit powerpc
 * and we don't want to impact user mode with our change to ll64
 * in the kernel.
 *
 * However, some user programs are fine with this.  They can
 * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
 */
#ifndef __KERNEL__
#if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__)
# include <asm-generic/int-l64.h>
#else
# include <asm-generic/int-ll64.h>
#endif
#endif

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h>
  2013-11-25 10:12     ` Geert Uytterhoeven
@ 2013-11-25 10:22       ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2013-11-25 10:22 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Linux-Arch, linux-kernel@vger.kernel.org,
	James E.J. Bottomley, Helge Deller, Parisc List

On Mon, 2013-11-25 at 11:12 +0100, Geert Uytterhoeven wrote:
> On Mon, Nov 25, 2013 at 10:55 AM, James Bottomley
> <James.Bottomley@hansenpartnership.com> wrote:
> > On Mon, 2013-11-25 at 09:55 +0100, Geert Uytterhoeven wrote:
> >> Uapi <asm-generic/types.h> just includes <asm-generic/int-ll64.h>
> >
> > This really doesn't look like a good idea:  Firstly the default of
> > asm-generic/types.h should *not* be int-ll64, because that's for 32 bit
> > only and most processors are moving towards 64 bit.  Secondly parisc
> 
> In kernelspace, both 32 and 64 bit are ll64.

Not necessarily; the files exist because of variations in gcc.  Some
versions of gcc have long long being 128 bits and for those you have to
use int-l64.h

> > currently only has a 32 bit userspace, which is why the file is a simple
> > include of int-ll64.h; however, people are working on 64 bit userspace
> 
> Sorry, I didn't know you support 32 bit userspace only.
> 
> > (albeit very slowly) and that file would then have to change.  If we
> > take the file away someone will forget to add the changed file back.
> 
> However, is this a "new" 64 bit userspace ABI? If yes, you may want to
> consider using ll64 in userspace on 64 bit too, like all "new" 64 bit ports
> do (arm64, s390, sparc, tile, x86). Only legacy alpha, ia64, mips and
> old ppc use l64.
> 
> Or follow the ppc64 road:
> 
> /*
>  * This is here because we used to use l64 for 64bit powerpc
>  * and we don't want to impact user mode with our change to ll64
>  * in the kernel.
>  *
>  * However, some user programs are fine with this.  They can
>  * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
>  */
> #ifndef __KERNEL__
> #if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__)
> # include <asm-generic/int-l64.h>
> #else
> # include <asm-generic/int-ll64.h>
> #endif
> #endif

That's the one I was thinking we might need.

James



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-25 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1385369734-24893-1-git-send-email-geert@linux-m68k.org>
2013-11-25  8:55 ` [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h> Geert Uytterhoeven
2013-11-25  9:55   ` James Bottomley
2013-11-25 10:12     ` Geert Uytterhoeven
2013-11-25 10:22       ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).