asm-generic: Rename int-ll64.h to types.h
Subsystems (12)
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
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
@@ -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
PATCH 2/24 avr32/uapi: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenUapi <asm-generic/types.h> just includes <asm-generic/int-ll64.h>
--- 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
@@ -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
@@ -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
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
Signed-off-by Geert Uytterhoeven <[email protected]>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.harch/avr32/include/uapi/asm/Kbuild +1
-1@@ -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.harch/avr32/include/uapi/asm/types.h deleted +0
-13@@ -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
PATCH 3/24 cris/uapi: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenUapi <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
@@ -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
@@ -1 +0,0 @@ -#include <asm-generic/int-ll64.h>
Signature · 1 line
1.7.9.5
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>Signed-off-by Geert Uytterhoeven <[email protected]>Cc Mikael Starvik <[email protected]>
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.harch/cris/include/uapi/asm/Kbuild +2
-1@@ -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.harch/cris/include/uapi/asm/types.h deleted +0
-1@@ -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]
PATCH 4/24 frv/uapi: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenUapi <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
@@ -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
@@ -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
PATCH 5/24 m32r/uapi: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenUapi <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
@@ -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
@@ -1 +0,0 @@ -#include <asm-generic/int-ll64.h>
Signature · 1 line
1.7.9.5
PATCH 6/24 microblaze/uapi: Use Kbuild logic to include <asm-generic/types.h>
In reply to Geert Uytterhoeven--- 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
@@ -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
@@ -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
PATCH 7/24 mn10300/uapi: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenUapi <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
@@ -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
@@ -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
PATCH 8/24 parisc/uapi: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenUapi <asm-generic/types.h> just includes <asm-generic/int-ll64.h>
--- 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
@@ -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
@@ -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
James Bottomley
maintainerRe: [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
Signed-off-by Geert Uytterhoeven <[email protected]>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.harch/parisc/include/uapi/asm/Kbuild +2
-1@@ -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.harch/parisc/include/uapi/asm/types.h deleted +0
-6@@ -1,6 +0,0 @@ -#ifndef _PARISC_TYPES_H -#define _PARISC_TYPES_H - -#include <asm-generic/int-ll64.h> - -#endif
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.hshould *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
James Bottomley
maintainerRe: [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.hshould *not* be int-ll64, because that's for 32 bit only and most processors are moving towards 64 bit. Secondly pariscIn 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 userspaceSorry, 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 getint-ll64.hhere. */
#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
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
@@ -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
@@ -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
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
@@ -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
@@ -1 +0,0 @@ -#include <asm-generic/types.h>
Signature · 1 line
1.7.9.5
PATCH 11/24 x86/uapi: Use Kbuild logic to include <asm-generic/types.h>
In reply to Geert Uytterhoeven--- 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
@@ -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
@@ -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
PATCH 12/24 alpha: Remove #include <uapi/asm/types.h> from <asm/types.h>
In reply to Geert UytterhoevenEverything in arch/alpha/include/uapi/asm/types.h is protected by "#ifndef __KERNEL__", so it's unused for kernelspace.
--- arch/alpha/include/asm/types.h | 1 - 1 file changed, 1 deletion(-)
arch/alpha/include/asm/types.h +0 -1
@@ -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
PATCH 13/24 mips: Remove #include <uapi/asm/types.h> from <asm/types.h>
In reply to Geert UytterhoevenEverything 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
@@ -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
PATCH 14/24 avr32: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenThe 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/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
@@ -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
@@ -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
Re: [PATCH 14/24] avr32: Use Kbuild logic to provide <asm/types.h>
Quoted 3 lines · Geert Uytterhoeven
The extra definition for
BITS_PER_LONGis 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
Signed-off-by Geert Uytterhoeven <[email protected]>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.harch/avr32/include/asm/Kbuild +1
-0@@ -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.harch/avr32/include/asm/types.h deleted +0
-19@@ -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
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_LONGis 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 includebitsperlong.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
PATCH 15/24 cris: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenThe 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
@@ -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
@@ -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
Re: [PATCH 15/24] cris: Use Kbuild logic to provide <asm/types.h>
Quoted 6 lines · Geert Uytterhoeven
The extra definition for
BITS_PER_LONGis also indirectly provided by <asm-generic/types.h>, via <asm-generic/int-ll64.h> and <asm/bitsperlong.h>Signed-off-by Geert Uytterhoeven <[email protected]>Cc Mikael Starvik <[email protected]>
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.harch/cris/include/asm/Kbuild +1
-0@@ -13,3 +13,4 @@ generic-y += trace_clock.h generic-y += vga.h generic-y += xor.h generic-y += preempt.h +generic-y += types.harch/cris/include/asm/types.h deleted +0
-12@@ -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]
PATCH 16/24 frv: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenThe 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
@@ -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
@@ -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
PATCH 17/24 m32r: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenThe 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
@@ -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
@@ -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
PATCH 18/24 mn10300: Use Kbuild logic to provide <asm/types.h>
In reply to Geert UytterhoevenThe 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
@@ -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
@@ -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
PATCH 19/24 sh: Replace <uapi/asm/types.h> by <asm-generic/int-ll64.h>
In reply to Geert UytterhoevenAs 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
@@ -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
PATCH 20/24 xtensa: Remove duplicate definition of BITS_PER_LONG
In reply to Geert UytterhoevenThe 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
@@ -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
PATCH 21/24 powerpc: Separate kernel/userspace inclusion of <asm-generic/int-ll64.h>
In reply to Geert UytterhoevenThis 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__.
--- 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
@@ -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
@@ -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
PATCH 22/24 s390: Separate kernel/userspace inclusion of <asm-generic/int-ll64.h>
In reply to Geert UytterhoevenThis 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
@@ -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
@@ -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
PATCH 23/24 xtensa: Separate kernel/userspace inclusion of <asm-generic/int-ll64.h>
In reply to Geert UytterhoevenThis 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
@@ -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
@@ -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
PATCH 24/24 asm-generic: Rename int-ll64.h to types.h
In reply to Geert UytterhoevenSince 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 readqstatic inline __u64 readq (const volatile void __iomem *addr)
include/asm-generic/io-64-nonatomic-lo-hi.h +1 -1
@@ -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 readqstatic inline __u64 readq (const volatile void __iomem *addr)
include/asm-generic/types.h renamed from include/asm-generic/int-ll64.h +4 -4
@@ -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
James Bottomley
maintainerQuoted 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.handinclude/uapi/asm-generic/int-ll64.h(int-l64.hmay 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, andint-ll64.hcan just be calledtypes.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
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.handinclude/uapi/asm-generic/int-ll64.h(int-l64.hmay 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, andint-ll64.hcan just be calledtypes.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.hwill give the wrong types for u64 and s64. I think gcc is changing to use the__int128type, 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