Package: src:linux-tools
Version: 3.14-1
User: debian-powe...@lists.debian.org
Usertags: ppc64el
Hi,
I looked at this for a while, in order to fix for ppc64el. A patch for
fixing this was submitted as part of #754213.
In short:
Using 'int-ll64.h' (which defines u32/u64/et al) in userspace on ppc64
requires defining "__SANE_USERSPACE_TYPES__", introduced in commit [4].
Rationale:
---------
This build failure
make[6]: Entering directory `/«PKGBUILDDIR»/debian/build/scripts/mod'
gcc -include real-lsb-32/types.h -I/«PKGBUILDDIR»/include -S -o
real-lsb-32/devicetable-offsets.s
/«PKGBUILDDIR»/scripts/mod/devicetable-offsets.c
In file included from ./real-lsb-32/types.h:1:0,
from <command-line>:0:
/«PKGBUILDDIR»/include/linux/types.h:148:1: error: unknown type name
'u32'
typedef u32 dma_addr_t;
^
occurs because of a change in the "asm/int-{l,ll}64.h" logic between
3.13 and 3.14.
(ppc64 build on with linux-libc-dev 3.13 succeeds [1] but 3.14 fails
[2])
The file 'int-l64.h' which defined non-double-underscore u32/u64 was
removed in commit [3] ('asm/types.h: Remove include/asm-generic
/int-l64.h') for *kernelspace*.
For *userspace*, the commits mentions this:
"""
For backwards compatibility, alpha, ia64, mips64, and
powerpc64 still use int-l64.h in userspace.
"""
but 'include/*uapi*/asm-generic/int-l64.h' defines double-underscore
__u32/__u64 (for userspace data type exportation, double-underscore)
The non-double-underscore definition u32/u64 is in 'int-*ll*64.h'.
Now, for ppc64, there a flag just for that (__SANE_USERSPACE_TYPES__),
which was introduced in [4] ('powerpc: Add__SANE_USERSPACE_TYPES__ to
asm/types.h for LL64'):
"""
[...] Some user programs (e.g. kvmtool) may actually
want LL64, so this patch adds a check for
__SANE_USERSPACE_TYPES__ so
that, if defined, int-ll64.h is included instead.
[...]
#if !defined(__SANE_USERSPACE_TYPES__)
[line breaks added for clarity]
&& defined(__powerpc64__)
&& !defined(__KERNEL__)
# include <asm-generic/int-l64.h>
#else
# include <asm-generic/int-ll64.h>
#endif
"""
It is used by perf (for example) [4] ('perf tools, powerpc: Fix compile
warnings in tests/attr.c').
I didn't find anything similar for alpha, unfortunately.
Links:
-----
[1] ppc64 build log: linux-tools with linux-libc-dev_3.13.5-1 (successful)
http://buildd.debian-ports.org/status/fetch.php?pkg=linux-tools&arch=ppc64&ver=3.13.6-1&stamp=1395302858
[2] ppc64 build log: linux-tools with linux-libc-dev_3.14.2-1 (failure)
http://buildd.debian-ports.org/status/fetch.php?pkg=linux-tools&arch=ppc64&ver=3.14-1&stamp=1399098596
[3] asm/types.h: Remove include/asm-generic/int-l64.h
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/include/asm-generic/int-l64.h?id=0c79a8e29b5fcbcbfd611daf9d500cfad8370fcf
[4] powerpc: Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/arch/powerpc/include/asm/types.h?id=2c9c6ce0199a4d252e20c531cfdc9d24e39235c0
[5] perf tools, powerpc: Fix compile warnings in tests/attr.c
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=e3541ec75219819d3235f80125a1a75d798ff6e1
--
Mauricio Faria de Oliveira
IBM Linux Technology Center
--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/53bc3ea1.1010...@linux.vnet.ibm.com