Skip to contentSkip to conversation

asm-generic: Rename int-ll64.h to types.h

PATCH In review Geert Uytterhoeven 4 participants 35 messages Nov 25, 2013

Subsystems (12)
Arm (32-bit) x86 PowerPC Kbuild +8 more subsystems
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 asm-generic: Rename int-ll64.h to types.h

This patchset aims to rename <asm-generic/int-ll64.h> to <asm-generic/types.h> in kernelspace, as suggested by Arnd.

While userspace still has both include/uapi/asm-generic/int-l64.h and include/uapi/asm-generic/int-ll64.h (int-l64.h may still be used on legacy 64-bit systems), kernelspace always uses "(unsigned) long long" for 64-bit integer values ("u64" and "s64"). Hence there's no longer a need to distinguish between int-l64 and int-ll64 in kernelspace, and int-ll64.h can just be called types.h

- Patch 01 adds a missing _UAPI prefix to <uapi/asm-generic/types.h> include guard, to avoid conflicts with the future <asm-generic/types.h>,
- Patches 02-11 switch to using Kbuild logic to provide UAPI <asm/types.h> on architectures where possible and not yet done,
- Patches 12-13 remove unneeded inclusions of <uapi/asm/types.h>,
- Patches 14-18 switch to using Kbuild logic to provide (kernelspace) <asm/types.h> on architectures where possible and not yet done, All of these differed from the generic version only by a superfluous definition of BITS_PER_LONG.
- Patch 19 Changes an include to harmonize with other architectures,
- Patch 20 removes a superfluous definition of BITS_PER_LONG,
- Patches 21-23 separate the inclusion of <asm-generic/int-ll64.h> in kernel- and userspace, as the kernelspace version will be renamed,
- Patch 24 does the actual rename from <asm-generic/int-ll64.h> to <asm-generic/types.h>.
Note: While arch/alpha/include/asm/types.h just includes asm-generic/types.h after this patch, don't be tempted to use Kbuild logic to provide it!
arch/*/include/asm/Kbuild seems to apply to both arch/*/include/asm and arch/*/include/uapi/asm, while alpha has its own <uapi/asm/types.h>. If you think this is a bug, please discuss this in reply to the last patch.

Most patches are trivial, and can be applied in any order. The last one is the only real sync point.

This has been compile-tested on all architectures that keep their own <uapi/asm/types.h>, and on a few others.
The result of "make headers_install" for all architectures has been compared manually before and after.

Thanks for your comments!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#1 lore raw

PATCH 1/24 uapi: Add missing _UAPI prefix to <asm-generic/types.h> include guard

---
 include/uapi/asm-generic/types.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/uapi/asm-generic/types.h +3 -3
index a3877926b0d4..e10cd6a87e46 100644
@@ -1,8 +1,8 @@
-#ifndef _ASM_GENERIC_TYPES_H
-#define _ASM_GENERIC_TYPES_H
+#ifndef _UAPI_ASM_GENERIC_TYPES_H
+#define _UAPI_ASM_GENERIC_TYPES_H
 /*
  * int-ll64 is used everywhere now.
  */
 #include <asm-generic/int-ll64.h>
 
-#endif /* _ASM_GENERIC_TYPES_H */
+#endif /* _UAPI_ASM_GENERIC_TYPES_H */
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/24 avr32/uapi: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

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

Cc Haavard Skinnemoen <[email protected]>
Cc Hans-Christian Egtvedt <[email protected]>
---
 arch/avr32/include/uapi/asm/Kbuild  |    2 +-
 arch/avr32/include/uapi/asm/types.h |   13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)
 delete mode 100644 arch/avr32/include/uapi/asm/types.h
arch/avr32/include/uapi/asm/Kbuild +1 -1
index 08d8a3d76ea8..1598223f0bfc 100644
@@ -19,7 +19,6 @@ header-y += stat.h
 header-y += swab.h
 header-y += termbits.h
 header-y += termios.h
-header-y += types.h
 header-y += unistd.h
 generic-y += bitsperlong.h
 generic-y += errno.h
@@ -34,3 +33,4 @@ generic-y += poll.h
 generic-y += resource.h
 generic-y += siginfo.h
 generic-y += statfs.h
+generic-y += types.h
arch/avr32/include/uapi/asm/types.h deleted +0 -13
deleted file mode 100644
index 7c986c4e99b5..000000000000
@@ -1,13 +0,0 @@
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef _UAPI__ASM_AVR32_TYPES_H
-#define _UAPI__ASM_AVR32_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#endif /* _UAPI__ASM_AVR32_TYPES_H */
Signature · 1 line
1.7.9.5
Acked-by on v1 2/24
#3 lore raw

Re: [PATCH 02/24] avr32/uapi: Use Kbuild logic to provide <asm/types.h>

Quoted 2 lines · Geert Uytterhoeven

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

Thanks for cleaning.

Quoted 3 lines
Cc Haavard Skinnemoen <[email protected]>
Cc Hans-Christian Egtvedt <[email protected]>
Quoted 42 lines
---
 arch/avr32/include/uapi/asm/Kbuild  |    2 +-
 arch/avr32/include/uapi/asm/types.h |   13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)
 delete mode 100644 arch/avr32/include/uapi/asm/types.h
arch/avr32/include/uapi/asm/Kbuild +1 -1
index 08d8a3d76ea8..1598223f0bfc 100644
@@ -19,7 +19,6 @@ header-y += stat.h
 header-y += swab.h
 header-y += termbits.h
 header-y += termios.h
-header-y += types.h
 header-y += unistd.h
 generic-y += bitsperlong.h
 generic-y += errno.h
@@ -34,3 +33,4 @@ generic-y += poll.h
 generic-y += resource.h
 generic-y += siginfo.h
 generic-y += statfs.h
+generic-y += types.h
arch/avr32/include/uapi/asm/types.h deleted +0 -13
deleted file mode 100644
index 7c986c4e99b5..000000000000
@@ -1,13 +0,0 @@
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef _UAPI__ASM_AVR32_TYPES_H
-#define _UAPI__ASM_AVR32_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#endif /* _UAPI__ASM_AVR32_TYPES_H */
Signature · 2 lines
mvh
Hans-Christian Egtvedt
#4 lore raw

PATCH 3/24 cris/uapi: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

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

---
 arch/cris/include/uapi/asm/Kbuild  |    3 ++-
 arch/cris/include/uapi/asm/types.h |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 arch/cris/include/uapi/asm/types.h
arch/cris/include/uapi/asm/Kbuild +2 -1
index 7d47b366ad82..4d925e6cce72 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += arch-v10/
 header-y += arch-v32/
 header-y += auxvec.h
@@ -35,5 +37,4 @@ header-y += swab.h
 header-y += sync_serial.h
 header-y += termbits.h
 header-y += termios.h
-header-y += types.h
 header-y += unistd.h
arch/cris/include/uapi/asm/types.h deleted +0 -1
deleted file mode 100644
index 9ec9d4c5ac4d..000000000000
@@ -1 +0,0 @@
-#include <asm-generic/int-ll64.h>
Signature · 1 line
1.7.9.5
Acked-by on v1 3/24
#5 lore raw

Re: [PATCH 03/24] cris/uapi: Use Kbuild logic to provide <asm/types.h>

Quoted 4 lines · Geert Uytterhoeven

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

Quoted 35 lines
---
 arch/cris/include/uapi/asm/Kbuild  |    3 ++-
 arch/cris/include/uapi/asm/types.h |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 arch/cris/include/uapi/asm/types.h
arch/cris/include/uapi/asm/Kbuild +2 -1
index 7d47b366ad82..4d925e6cce72 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += arch-v10/
 header-y += arch-v32/
 header-y += auxvec.h
@@ -35,5 +37,4 @@ header-y += swab.h
 header-y += sync_serial.h
 header-y += termbits.h
 header-y += termios.h
-header-y += types.h
 header-y += unistd.h
arch/cris/include/uapi/asm/types.h deleted +0 -1
deleted file mode 100644
index 9ec9d4c5ac4d..000000000000
@@ -1 +0,0 @@
-#include <asm-generic/int-ll64.h>
Signature · 1 line
1.7.9.5

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]
#6 lore raw

PATCH 4/24 frv/uapi: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

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

---
 arch/frv/include/uapi/asm/Kbuild  |    3 ++-
 arch/frv/include/uapi/asm/types.h |   11 -----------
 2 files changed, 2 insertions(+), 12 deletions(-)
 delete mode 100644 arch/frv/include/uapi/asm/types.h
arch/frv/include/uapi/asm/Kbuild +2 -1
index 42a2b33461c0..1c5bfe5ffba0 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += byteorder.h
@@ -31,5 +33,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
arch/frv/include/uapi/asm/types.h deleted +0 -11
deleted file mode 100644
index cf23149943f9..000000000000
@@ -1,11 +0,0 @@
-/* types.h: FRV types
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([email protected])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <asm-generic/int-ll64.h>
Signature · 1 line
1.7.9.5
#7 lore raw

PATCH 5/24 m32r/uapi: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

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

---
 arch/m32r/include/uapi/asm/Kbuild  |    3 ++-
 arch/m32r/include/uapi/asm/types.h |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 arch/m32r/include/uapi/asm/types.h
arch/m32r/include/uapi/asm/Kbuild +2 -1
index 43937a61d6cf..87f6d698fb9c 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += byteorder.h
@@ -29,5 +31,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
arch/m32r/include/uapi/asm/types.h deleted +0 -1
deleted file mode 100644
index 9ec9d4c5ac4d..000000000000
@@ -1 +0,0 @@
-#include <asm-generic/int-ll64.h>
Signature · 1 line
1.7.9.5
#8 lore raw

PATCH 6/24 microblaze/uapi: Use Kbuild logic to include <asm-generic/types.h>

In reply to Geert Uytterhoeven
Cc Michal Simek <[email protected]>
Cc microblaze-uclinux-rVRm/[email protected]
---
 arch/microblaze/include/uapi/asm/Kbuild  |    3 ++-
 arch/microblaze/include/uapi/asm/types.h |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 arch/microblaze/include/uapi/asm/types.h
arch/microblaze/include/uapi/asm/Kbuild +2 -1
index 6d7d7f4aaae8..1aac99f87df1 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += byteorder.h
@@ -31,5 +33,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
arch/microblaze/include/uapi/asm/types.h deleted +0 -1
deleted file mode 100644
index b9e79bc580dd..000000000000
@@ -1 +0,0 @@
-#include <asm-generic/types.h>
Signature · 6 lines
1.7.9.5

_______________________________________________
microblaze-linux mailing list
microblaze-linux-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org
https://lists.eait.uq.edu.au/mailman/listinfo/microblaze-linux
#9 lore raw

PATCH 7/24 mn10300/uapi: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

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

---
 arch/mn10300/include/uapi/asm/Kbuild  |    3 ++-
 arch/mn10300/include/uapi/asm/types.h |   11 -----------
 2 files changed, 2 insertions(+), 12 deletions(-)
 delete mode 100644 arch/mn10300/include/uapi/asm/types.h
arch/mn10300/include/uapi/asm/Kbuild +2 -1
index 040178cdb3eb..bdc329ac60aa 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += byteorder.h
@@ -30,5 +32,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
arch/mn10300/include/uapi/asm/types.h deleted +0 -11
deleted file mode 100644
index 8b3f0501b9bc..000000000000
@@ -1,11 +0,0 @@
-/* MN10300 Basic type definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#include <asm-generic/int-ll64.h>
Signature · 1 line
1.7.9.5
#10 lore raw

PATCH 8/24 parisc/uapi: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

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

Cc "James E.J. Bottomley" <[email protected]>
Cc Helge Deller <[email protected]>
---
 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
arch/parisc/include/uapi/asm/Kbuild +2 -1
index a580642555b6..e0da93254186 100644
@@ -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
arch/parisc/include/uapi/asm/types.h deleted +0 -6
deleted file mode 100644
index 8866f9bbdeaf..000000000000
@@ -1,6 +0,0 @@
-#ifndef _PARISC_TYPES_H
-#define _PARISC_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#endif
Signature · 1 line
1.7.9.5
maintainer
#11 lore raw

Re: [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h>

Quoted 1 line · Geert Uytterhoeven

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

Quoted 41 lines
Cc "James E.J. Bottomley" <[email protected]>
Cc Helge Deller <[email protected]>
---
 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
arch/parisc/include/uapi/asm/Kbuild +2 -1
index a580642555b6..e0da93254186 100644
@@ -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
arch/parisc/include/uapi/asm/types.h deleted +0 -6
deleted file mode 100644
index 8866f9bbdeaf..000000000000
@@ -1,6 +0,0 @@
-#ifndef _PARISC_TYPES_H
-#define _PARISC_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#endif
#12 lore raw

Re: [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h>

Quoted 6 lines · James Bottomley
Quoted 1 line · Geert Uytterhoeven

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.

Quoted 2 lines

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.

Quoted 2 lines

(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 -- [email protected]

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

maintainer
#13 lore raw

Re: [PATCH 08/24] parisc/uapi: Use Kbuild logic to provide <asm/types.h>

Quoted 10 lines · Geert Uytterhoeven
Quoted 6 lines · James Bottomley
Quoted 1 line · Geert Uytterhoeven

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

Quoted 25 lines
Quoted 2 lines

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.

Quoted 2 lines

(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__)

Quoted 5 lines
# 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

#14 lore raw

PATCH 9/24 score/uapi: Use Kbuild logic to include <asm-generic/types.h>

In reply to Geert Uytterhoeven
---
 arch/score/include/uapi/asm/Kbuild  |    3 ++-
 arch/score/include/uapi/asm/types.h |    6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)
 delete mode 100644 arch/score/include/uapi/asm/types.h
arch/score/include/uapi/asm/Kbuild +2 -1
index 040178cdb3eb..bdc329ac60aa 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += auxvec.h
 header-y += bitsperlong.h
 header-y += byteorder.h
@@ -30,5 +32,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
arch/score/include/uapi/asm/types.h deleted +0 -6
deleted file mode 100644
index 2140032778ee..000000000000
@@ -1,6 +0,0 @@
-#ifndef _ASM_SCORE_TYPES_H
-#define _ASM_SCORE_TYPES_H
-
-#include <asm-generic/types.h>
-
-#endif /* _ASM_SCORE_TYPES_H */
Signature · 1 line
1.7.9.5
#15 lore raw

PATCH 10/24 sh/uapi: Use Kbuild logic to include <asm-generic/types.h>

In reply to Geert Uytterhoeven
---
 arch/sh/include/uapi/asm/Kbuild  |    3 ++-
 arch/sh/include/uapi/asm/types.h |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 arch/sh/include/uapi/asm/types.h
arch/sh/include/uapi/asm/Kbuild +2 -1
index 60613ae78513..03b29041b09f 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 header-y += auxvec.h
 header-y += byteorder.h
 header-y += cachectl.h
@@ -19,7 +21,6 @@ header-y += signal.h
 header-y += sockios.h
 header-y += stat.h
 header-y += swab.h
-header-y += types.h
 header-y += unistd.h
 header-y += unistd_32.h
 header-y += unistd_64.h
arch/sh/include/uapi/asm/types.h deleted +0 -1
deleted file mode 100644
index b9e79bc580dd..000000000000
@@ -1 +0,0 @@
-#include <asm-generic/types.h>
Signature · 1 line
1.7.9.5
#16 lore raw

PATCH 11/24 x86/uapi: Use Kbuild logic to include <asm-generic/types.h>

In reply to Geert Uytterhoeven
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/include/uapi/asm/Kbuild  |    3 ++-
 arch/x86/include/uapi/asm/types.h |    6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)
 delete mode 100644 arch/x86/include/uapi/asm/types.h
arch/x86/include/uapi/asm/Kbuild +2 -1
index 09409c44f9a5..42951639fc2c 100644
@@ -1,6 +1,8 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
+generic-y += types.h
+
 genhdr-y += unistd_32.h
 genhdr-y += unistd_64.h
 genhdr-y += unistd_x32.h
@@ -56,7 +58,6 @@ header-y += svm.h
 header-y += swab.h
 header-y += termbits.h
 header-y += termios.h
-header-y += types.h
 header-y += ucontext.h
 header-y += unistd.h
 header-y += vm86.h
arch/x86/include/uapi/asm/types.h deleted +0 -6
deleted file mode 100644
index 8e8c23fef08c..000000000000
@@ -1,6 +0,0 @@
-#ifndef _ASM_X86_TYPES_H
-#define _ASM_X86_TYPES_H
-
-#include <asm-generic/types.h>
-
-#endif /* _ASM_X86_TYPES_H */
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH 12/24 alpha: Remove #include <uapi/asm/types.h> from <asm/types.h>

In reply to Geert Uytterhoeven

Everything in arch/alpha/include/uapi/asm/types.h is protected by "#ifndef __KERNEL__", so it's unused for kernelspace.

Cc Richard Henderson <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc Matt Turner <[email protected]>
---
 arch/alpha/include/asm/types.h |    1 -
 1 file changed, 1 deletion(-)
arch/alpha/include/asm/types.h +0 -1
index f61e1a56c378..4cb4b6d3452c 100644
@@ -2,6 +2,5 @@
 #define _ALPHA_TYPES_H
 
 #include <asm-generic/int-ll64.h>
-#include <uapi/asm/types.h>
 
 #endif /* _ALPHA_TYPES_H */
Signature · 1 line
1.7.9.5
#18 lore raw

PATCH 13/24 mips: Remove #include <uapi/asm/types.h> from <asm/types.h>

In reply to Geert Uytterhoeven

Everything in arch/mips/include/uapi/asm/types.h is protected by "#ifndef __KERNEL__", so it's unused for kernelspace.

---
 arch/mips/include/asm/types.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/mips/include/asm/types.h +1 -2
index a845aafedee4..4d5ce4c9c924 100644
@@ -11,8 +11,7 @@
 #ifndef _ASM_TYPES_H
 #define _ASM_TYPES_H
 
-# include <asm-generic/int-ll64.h>
-#include <uapi/asm/types.h>
+#include <asm-generic/int-ll64.h>
 
 /*
  * These aren't exported outside the kernel to avoid name space clashes
Signature · 1 line
1.7.9.5
#19 lore raw

PATCH 14/24 avr32: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

Cc Haavard Skinnemoen <[email protected]>
Cc Hans-Christian Egtvedt <[email protected]>
---
 arch/avr32/include/asm/Kbuild  |    1 +
 arch/avr32/include/asm/types.h |   19 -------------------
 2 files changed, 1 insertion(+), 19 deletions(-)
 delete mode 100644 arch/avr32/include/asm/types.h
arch/avr32/include/asm/Kbuild +1 -0
index 658001b52400..129f4ff68066 100644
@@ -17,4 +17,5 @@ generic-y       += scatterlist.h
 generic-y       += sections.h
 generic-y       += topology.h
 generic-y	+= trace_clock.h
+generic-y	+= types.h
 generic-y       += xor.h
arch/avr32/include/asm/types.h deleted +0 -19
deleted file mode 100644
index 59324058069c..000000000000
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef __ASM_AVR32_TYPES_H
-#define __ASM_AVR32_TYPES_H
-
-#include <uapi/asm/types.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif /* __ASM_AVR32_TYPES_H */
Signature · 1 line
1.7.9.5
Acked-by on v1 14/24
#20 lore raw

Re: [PATCH 14/24] avr32: Use Kbuild logic to provide <asm/types.h>

Quoted 3 lines · Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

Are you adding a new include/asm-generic/types.h, which will include bitsperlong.h ?

If so, nice cleaning, and you have my

Quoted 3 lines
Cc Haavard Skinnemoen <[email protected]>
Cc Hans-Christian Egtvedt <[email protected]>
Quoted 41 lines
---
 arch/avr32/include/asm/Kbuild  |    1 +
 arch/avr32/include/asm/types.h |   19 -------------------
 2 files changed, 1 insertion(+), 19 deletions(-)
 delete mode 100644 arch/avr32/include/asm/types.h
arch/avr32/include/asm/Kbuild +1 -0
index 658001b52400..129f4ff68066 100644
@@ -17,4 +17,5 @@ generic-y       += scatterlist.h
 generic-y       += sections.h
 generic-y       += topology.h
 generic-y	+= trace_clock.h
+generic-y	+= types.h
 generic-y       += xor.h
arch/avr32/include/asm/types.h deleted +0 -19
deleted file mode 100644
index 59324058069c..000000000000
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef __ASM_AVR32_TYPES_H
-#define __ASM_AVR32_TYPES_H
-
-#include <uapi/asm/types.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif /* __ASM_AVR32_TYPES_H */
Signature · 2 lines
mvh
Hans-Christian Egtvedt
#21 lore raw

Re: [PATCH 14/24] avr32: Use Kbuild logic to provide <asm/types.h>

Quoted 7 lines · Hans-Christian Egtvedt
Quoted 3 lines · Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

Are you adding a new include/asm-generic/types.h, which will include bitsperlong.h ?

Yes, that's [PATCH 24/24].

Currently you get it through the UAPI <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#22 lore raw

PATCH 15/24 cris: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

---
 arch/cris/include/asm/Kbuild  |    1 +
 arch/cris/include/asm/types.h |   12 ------------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100644 arch/cris/include/asm/types.h
arch/cris/include/asm/Kbuild +1 -0
index 44e7d0dbcf32..2433df443890 100644
@@ -13,3 +13,4 @@ generic-y += trace_clock.h
 generic-y += vga.h
 generic-y += xor.h
 generic-y += preempt.h
+generic-y += types.h
arch/cris/include/asm/types.h deleted +0 -12
deleted file mode 100644
index a3cac7757c7f..000000000000
@@ -1,12 +0,0 @@
-#ifndef _ETRAX_TYPES_H
-#define _ETRAX_TYPES_H
-
-#include <uapi/asm/types.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif
Signature · 1 line
1.7.9.5
Acked-by on v1 15/24
#23 lore raw

Re: [PATCH 15/24] cris: Use Kbuild logic to provide <asm/types.h>

Quoted 6 lines · Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

Quoted 36 lines
---
 arch/cris/include/asm/Kbuild  |    1 +
 arch/cris/include/asm/types.h |   12 ------------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100644 arch/cris/include/asm/types.h
arch/cris/include/asm/Kbuild +1 -0
index 44e7d0dbcf32..2433df443890 100644
@@ -13,3 +13,4 @@ generic-y += trace_clock.h
 generic-y += vga.h
 generic-y += xor.h
 generic-y += preempt.h
+generic-y += types.h
arch/cris/include/asm/types.h deleted +0 -12
deleted file mode 100644
index a3cac7757c7f..000000000000
@@ -1,12 +0,0 @@
-#ifndef _ETRAX_TYPES_H
-#define _ETRAX_TYPES_H
-
-#include <uapi/asm/types.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif
Signature · 1 line
1.7.9.5

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]
#24 lore raw

PATCH 16/24 frv: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

---
 arch/frv/include/asm/Kbuild  |    1 +
 arch/frv/include/asm/types.h |   22 ----------------------
 2 files changed, 1 insertion(+), 22 deletions(-)
 delete mode 100644 arch/frv/include/asm/types.h
arch/frv/include/asm/Kbuild +1 -0
index 74742dc6a3da..28abdd0b8287 100644
@@ -3,3 +3,4 @@ generic-y += clkdev.h
 generic-y += exec.h
 generic-y += trace_clock.h
 generic-y += preempt.h
+generic-y += types.h
arch/frv/include/asm/types.h deleted +0 -22
deleted file mode 100644
index 6bc63650d832..000000000000
@@ -1,22 +0,0 @@
-/* types.h: FRV types
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([email protected])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#ifndef _ASM_TYPES_H
-#define _ASM_TYPES_H
-
-#include <uapi/asm/types.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif /* _ASM_TYPES_H */
Signature · 1 line
1.7.9.5
#25 lore raw

PATCH 17/24 m32r: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

---
 arch/m32r/include/asm/Kbuild  |    1 +
 arch/m32r/include/asm/types.h |   12 ------------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100644 arch/m32r/include/asm/types.h
arch/m32r/include/asm/Kbuild +1 -0
index e03862db9b75..e1138b819fcc 100644
@@ -5,3 +5,4 @@ generic-y += module.h
 generic-y += sections.h
 generic-y += trace_clock.h
 generic-y += preempt.h
+generic-y += types.h
arch/m32r/include/asm/types.h deleted +0 -12
deleted file mode 100644
index 04a44c6ee34d..000000000000
@@ -1,12 +0,0 @@
-#ifndef _ASM_M32R_TYPES_H
-#define _ASM_M32R_TYPES_H
-
-#include <uapi/asm/types.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif /* _ASM_M32R_TYPES_H */
Signature · 1 line
1.7.9.5
#26 lore raw

PATCH 18/24 mn10300: Use Kbuild logic to provide <asm/types.h>

In reply to Geert Uytterhoeven

The extra definition for BITS_PER_LONG is also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

---
 arch/mn10300/include/asm/Kbuild  |    1 +
 arch/mn10300/include/asm/types.h |   22 ----------------------
 2 files changed, 1 insertion(+), 22 deletions(-)
 delete mode 100644 arch/mn10300/include/asm/types.h
arch/mn10300/include/asm/Kbuild +1 -0
index cd33bcfc49d8..289ff285f1f9 100644
@@ -4,3 +4,4 @@ generic-y += exec.h
 generic-y += sections.h
 generic-y += trace_clock.h
 generic-y += preempt.h
+generic-y += types.h
arch/mn10300/include/asm/types.h deleted +0 -22
deleted file mode 100644
index 3d6e48311bef..000000000000
@@ -1,22 +0,0 @@
-/* MN10300 Basic type definitions
- *
- * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
-#ifndef _ASM_TYPES_H
-#define _ASM_TYPES_H
-
-#include <uapi/asm/types.h>
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif /* _ASM_TYPES_H */
Signature · 1 line
1.7.9.5
#27 lore raw

PATCH 19/24 sh: Replace <uapi/asm/types.h> by <asm-generic/int-ll64.h>

In reply to Geert Uytterhoeven

As arch/sh/include/uapi/asm/types.h doesn't exist, sh doesn't provide any sh-specific uapi definitions, and it can just include <asm-generic/int-ll64.h>, like most other architectures.

---
 arch/sh/include/asm/types.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/include/asm/types.h +1 -1
index 6a31053fa5e3..062324be5cd6 100644
@@ -1,7 +1,7 @@
 #ifndef __ASM_SH_TYPES_H
 #define __ASM_SH_TYPES_H
 
-#include <uapi/asm/types.h>
+#include <asm-generic/int-ll64.h>
 
 /*
  * These aren't exported outside the kernel to avoid name space clashes
Signature · 1 line
1.7.9.5
#28 lore raw

PATCH 20/24 xtensa: Remove duplicate definition of BITS_PER_LONG

In reply to Geert Uytterhoeven

The definition for BITS_PER_LONG is already indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>

---
 arch/xtensa/include/asm/types.h |    8 --------
 1 file changed, 8 deletions(-)
arch/xtensa/include/asm/types.h +0 -8
index 2b410b8c7f79..44f411c75837 100644
@@ -12,12 +12,4 @@
 
 #include <uapi/asm/types.h>
 
-#ifndef __ASSEMBLY__
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-
-#define BITS_PER_LONG 32
-
-#endif
 #endif	/* _XTENSA_TYPES_H */
Signature · 1 line
1.7.9.5
#29 lore raw

PATCH 21/24 powerpc: Separate kernel/userspace inclusion of <asm-generic/int-ll64.h>

In reply to Geert Uytterhoeven

This allows to rename the kernelspace version later.

Now arch/powerpc/include/asm/types.h includes the kernelspace version, while arch/powerpc/include/uapi/asm/types.h includes the userspace version. As arch/powerpc/include/uapi/asm/types.h is also included for kernelspace, its inclusion of <asm-generic/int-ll64.h> needs to be protected by #ifndef __KERNEL__.

Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
---
 arch/powerpc/include/asm/types.h      |    1 +
 arch/powerpc/include/uapi/asm/types.h |    4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
arch/powerpc/include/asm/types.h +1 -0
index bfb6ded38ffa..4b9c3530bb12 100644
@@ -13,6 +13,7 @@
 #ifndef _ASM_POWERPC_TYPES_H
 #define _ASM_POWERPC_TYPES_H
 
+#include <asm-generic/int-ll64.h>
 #include <uapi/asm/types.h>
 
 #ifndef __ASSEMBLY__
arch/powerpc/include/uapi/asm/types.h +3 -1
index 4b8ab990a3c1..7f8847b61d03 100644
@@ -21,11 +21,13 @@
  * However, some user programs are fine with this.  They can
  * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
  */
-#if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__) && !defined(__KERNEL__)
+#ifndef __KERNEL__
+#if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__)
 # include <asm-generic/int-l64.h>
 #else
 # include <asm-generic/int-ll64.h>
 #endif
+#endif
 
 #ifndef __ASSEMBLY__
 
Signature · 1 line
1.7.9.5
#30 lore raw

PATCH 22/24 s390: Separate kernel/userspace inclusion of <asm-generic/int-ll64.h>

In reply to Geert Uytterhoeven

This allows to rename the kernelspace version later.

Now arch/s390/include/asm/types.h includes the kernelspace version, while arch/s390/include/uapi/asm/types.h includes the userspace version. As arch/s390/include/uapi/asm/types.h is also included for kernelspace, its inclusion of <asm-generic/int-ll64.h> needs to be protected by #ifndef __KERNEL__.

---
 arch/s390/include/asm/types.h      |    1 +
 arch/s390/include/uapi/asm/types.h |    2 ++
 2 files changed, 3 insertions(+)
arch/s390/include/asm/types.h +1 -0
index dccef3ca91fa..a5c7e829dbc3 100644
@@ -6,6 +6,7 @@
 #ifndef _S390_TYPES_H
 #define _S390_TYPES_H
 
+#include <asm-generic/int-ll64.h>
 #include <uapi/asm/types.h>
 
 /*
arch/s390/include/uapi/asm/types.h +2 -0
index 038f2b9178a4..13b5ad14380d 100644
@@ -7,7 +7,9 @@
 #ifndef _UAPI_S390_TYPES_H
 #define _UAPI_S390_TYPES_H
 
+#ifndef __KERNEL__
 #include <asm-generic/int-ll64.h>
+#endif
 
 #ifndef __ASSEMBLY__
 
Signature · 1 line
1.7.9.5
#31 lore raw

PATCH 23/24 xtensa: Separate kernel/userspace inclusion of <asm-generic/int-ll64.h>

In reply to Geert Uytterhoeven

This allows to rename the kernelspace version later.

Now arch/xtensa/include/asm/types.h includes the kernelspace version, while arch/xtensa/include/uapi/asm/types.h includes the userspace version. As arch/xtensa/include/uapi/asm/types.h is also included for kernelspace, its inclusion of <asm-generic/int-ll64.h> needs to be protected by #ifndef __KERNEL__.

---
 arch/xtensa/include/asm/types.h      |    1 +
 arch/xtensa/include/uapi/asm/types.h |    2 ++
 2 files changed, 3 insertions(+)
arch/xtensa/include/asm/types.h +1 -0
index 44f411c75837..d873cb17d944 100644
@@ -10,6 +10,7 @@
 #ifndef _XTENSA_TYPES_H
 #define _XTENSA_TYPES_H
 
+#include <asm-generic/int-ll64.h>
 #include <uapi/asm/types.h>
 
 #endif	/* _XTENSA_TYPES_H */
arch/xtensa/include/uapi/asm/types.h +2 -0
index 87ec7ae73cb1..5340b9fdb395 100644
@@ -11,7 +11,9 @@
 #ifndef _UAPI_XTENSA_TYPES_H
 #define _UAPI_XTENSA_TYPES_H
 
+#ifndef __KERNEL__
 #include <asm-generic/int-ll64.h>
+#endif
 
 #ifdef __ASSEMBLY__
 # define __XTENSA_UL(x)		(x)
Signature · 1 line
1.7.9.5
#32 lore raw

PATCH 24/24 asm-generic: Rename int-ll64.h to types.h

In reply to Geert Uytterhoeven

Since kernelspace always uses "(unsigned) long long" for 64-bit integer values ("u64" and "s64"), rename include/asm-generic/int-ll64.h to include/asm-generic/types.h, as suggested by Arnd Bergmann.

Userspace still has both include/uapi/asm-generic/int-l64.h and include/uapi/asm-generic/int-ll64.h, as int-l64.h may still be used for userspace on existing 64-bit platforms (alpha, ia64, mips, and powerpc).

Note: While arch/alpha/include/asm/types.h just includes asm-generic/types.h, don't be tempted to use Kbuild logic to provide it! arch/*/include/asm/Kbuild applies to both arch/*/include/asm and arch/*/include/uapi/asm, while alpha has its own <uapi/asm/types.h>.

---
Question: Is the arch/*/include/asm/Kbuild behavior intentional?

 arch/alpha/include/asm/types.h              |    2 +-
 arch/arm/include/asm/types.h                |    2 +-
 arch/ia64/include/asm/types.h               |    2 +-
 arch/mips/include/asm/types.h               |    2 +-
 arch/powerpc/include/asm/types.h            |    2 +-
 arch/s390/include/asm/types.h               |    2 +-
 arch/sh/include/asm/types.h                 |    2 +-
 arch/xtensa/include/asm/types.h             |    2 +-
 include/asm-generic/io-64-nonatomic-hi-lo.h |    2 +-
 include/asm-generic/io-64-nonatomic-lo-hi.h |    2 +-
 include/asm-generic/{int-ll64.h => types.h} |    8 ++++----
 11 files changed, 14 insertions(+), 14 deletions(-)
 rename include/asm-generic/{int-ll64.h => types.h} (85%)
arch/alpha/include/asm/types.h +1 -1
index 4cb4b6d3452c..b86fb65c5b10 100644
@@ -1,6 +1,6 @@
 #ifndef _ALPHA_TYPES_H
 #define _ALPHA_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 
 #endif /* _ALPHA_TYPES_H */
arch/arm/include/asm/types.h +1 -1
index a53cdb8f068c..09e15a8a40b1 100644
@@ -1,7 +1,7 @@
 #ifndef _ASM_TYPES_H
 #define _ASM_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 
 /*
  * The C99 types uintXX_t that are usually defined in 'stdint.h' are not as
arch/ia64/include/asm/types.h +1 -1
index 4c351b169da2..6bc2e8acadd7 100644
@@ -13,7 +13,7 @@
 #ifndef _ASM_IA64_TYPES_H
 #define _ASM_IA64_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 #include <uapi/asm/types.h>
 
 #ifdef __ASSEMBLY__
arch/mips/include/asm/types.h +1 -1
index 4d5ce4c9c924..0d6729329a6a 100644
@@ -11,7 +11,7 @@
 #ifndef _ASM_TYPES_H
 #define _ASM_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 
 /*
  * These aren't exported outside the kernel to avoid name space clashes
arch/powerpc/include/asm/types.h +1 -1
index 4b9c3530bb12..69d42a918e0e 100644
@@ -13,7 +13,7 @@
 #ifndef _ASM_POWERPC_TYPES_H
 #define _ASM_POWERPC_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 #include <uapi/asm/types.h>
 
 #ifndef __ASSEMBLY__
arch/s390/include/asm/types.h +1 -1
index a5c7e829dbc3..abb93c7f0125 100644
@@ -6,7 +6,7 @@
 #ifndef _S390_TYPES_H
 #define _S390_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 #include <uapi/asm/types.h>
 
 /*
arch/sh/include/asm/types.h +1 -1
index 062324be5cd6..ef745dcfd926 100644
@@ -1,7 +1,7 @@
 #ifndef __ASM_SH_TYPES_H
 #define __ASM_SH_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 
 /*
  * These aren't exported outside the kernel to avoid name space clashes
arch/xtensa/include/asm/types.h +1 -1
index d873cb17d944..20ffdf440e4f 100644
@@ -10,7 +10,7 @@
 #ifndef _XTENSA_TYPES_H
 #define _XTENSA_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 #include <uapi/asm/types.h>
 
 #endif	/* _XTENSA_TYPES_H */
include/asm-generic/io-64-nonatomic-hi-lo.h +1 -1
index a6806a94250d..414d2c49d53c 100644
@@ -2,7 +2,7 @@
 #define _ASM_IO_64_NONATOMIC_HI_LO_H_
 
 #include <linux/io.h>
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 
 #ifndef readq
 static inline __u64 readq(const volatile void __iomem *addr)
include/asm-generic/io-64-nonatomic-lo-hi.h +1 -1
index ca546b1ff8b5..9bc5a3393ca1 100644
@@ -2,7 +2,7 @@
 #define _ASM_IO_64_NONATOMIC_LO_HI_H_
 
 #include <linux/io.h>
-#include <asm-generic/int-ll64.h>
+#include <asm-generic/types.h>
 
 #ifndef readq
 static inline __u64 readq(const volatile void __iomem *addr)
include/asm-generic/types.h renamed from include/asm-generic/int-ll64.h +4 -4
similarity index 85%
rename from include/asm-generic/int-ll64.h
rename to include/asm-generic/types.h
index 4cd84855cb46..b9542bb3d991 100644
@@ -1,11 +1,11 @@
 /*
- * asm-generic/int-ll64.h
+ * asm-generic/types.h
  *
  * Integer declarations for architectures which use "long long"
  * for 64-bit types.
  */
-#ifndef _ASM_GENERIC_INT_LL64_H
-#define _ASM_GENERIC_INT_LL64_H
+#ifndef _ASM_GENERIC_TYPES_H
+#define _ASM_GENERIC_TYPES_H
 
 #include <uapi/asm-generic/int-ll64.h>
 
@@ -46,4 +46,4 @@ typedef unsigned long long u64;
 
 #endif /* __ASSEMBLY__ */
 
-#endif /* _ASM_GENERIC_INT_LL64_H */
+#endif /* _ASM_GENERIC_TYPES_H */
Signature · 1 line
1.7.9.5
maintainer
#33 lore raw
In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven

This patchset aims to rename <asm-generic/int-ll64.h> to <asm-generic/types.h> in kernelspace, as suggested by Arnd.

While userspace still has both include/uapi/asm-generic/int-l64.h and include/uapi/asm-generic/int-ll64.h (int-l64.h may still be used on legacy 64-bit systems), kernelspace always uses "(unsigned) long long" for 64-bit integer values ("u64" and "s64"). Hence there's no longer a need to distinguish between int-l64 and int-ll64 in kernelspace, and int-ll64.h can just be called types.h

Is this a good idea? I thought some versions of gcc used long long for 128 bit integers, in which case int-ll64.h will give the wrong types for u64 and s64. I think gcc is changing to use the __int128 type, so this may be historical, but someone would need to validate that we have no architectures with the old long long behaviour.

James

#34 lore raw
Quoted 11 lines · James Bottomley
Quoted 9 lines · Geert Uytterhoeven

This patchset aims to rename <asm-generic/int-ll64.h> to <asm-generic/types.h> in kernelspace, as suggested by Arnd.

While userspace still has both include/uapi/asm-generic/int-l64.h and include/uapi/asm-generic/int-ll64.h (int-l64.h may still be used on legacy 64-bit systems), kernelspace always uses "(unsigned) long long" for 64-bit integer values ("u64" and "s64"). Hence there's no longer a need to distinguish between int-l64 and int-ll64 in kernelspace, and int-ll64.h can just be called types.h

Quoted 5 lines

Is this a good idea? I thought some versions of gcc used long long for 128 bit integers, in which case int-ll64.h will give the wrong types for u64 and s64. I think gcc is changing to use the __int128 type, so this may be historical, but someone would need to validate that we have no architectures with the old long long behaviour.

I'm sorry, "(unsigned) long long" is always 64 bit in kernelspace.

<asm-generic/int-l64.h> is included in uapi files only, and all of these inclusions are protected by #ifndef __KERNEL__:

$ git grep -C 2 "include.*int-l64.h" -- "*.h"
arch/alpha/include/uapi/asm/types.h-
arch/alpha/include/uapi/asm/types.h-#ifndef __KERNEL__
arch/alpha/include/uapi/asm/types.h:#include <asm-generic/int-l64.h>
arch/alpha/include/uapi/asm/types.h-#endif
arch/alpha/include/uapi/asm/types.h-
--
arch/ia64/include/uapi/asm/types.h-
arch/ia64/include/uapi/asm/types.h-#ifndef __KERNEL__
arch/ia64/include/uapi/asm/types.h:#include <asm-generic/int-l64.h>
arch/ia64/include/uapi/asm/types.h-#endif
arch/ia64/include/uapi/asm/types.h-
--
arch/mips/include/uapi/asm/types.h-#ifndef __KERNEL__
arch/mips/include/uapi/asm/types.h-# if _MIPS_SZLONG == 64
arch/mips/include/uapi/asm/types.h:#  include <asm-generic/int-l64.h>
arch/mips/include/uapi/asm/types.h-# else
arch/mips/include/uapi/asm/types.h-#  include <asm-generic/int-ll64.h>
--
arch/powerpc/include/uapi/asm/types.h- */
arch/powerpc/include/uapi/asm/types.h-#if
!defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__) &&
!defined(__KERNEL__)
arch/powerpc/include/uapi/asm/types.h:# include <asm-generic/int-l64.h>
arch/powerpc/include/uapi/asm/types.h-#else
arch/powerpc/include/uapi/asm/types.h-# include <asm-generic/int-ll64.h>
--
include/asm-generic/int-l64.h-#define _ASM_GENERIC_INT_L64_H
include/asm-generic/int-l64.h-
include/asm-generic/int-l64.h:#include <uapi/asm-generic/int-l64.h>
include/asm-generic/int-l64.h-
include/asm-generic/int-l64.h-
$

(non-UAPI include/asm-generic/int-l64.h is unused, its removal is pending).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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