summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/uapi
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nsn.com>2014-05-06 15:55:43 +0300
committerRalf Baechle <ralf@linux-mips.org>2014-05-28 10:51:13 +0200
commitf4b3aa7cd9d32407670e67238c5ee752bb98f481 (patch)
tree194d41bab42f1c545070cf36ed5db34e53d183b3 /arch/mips/include/uapi
parent4fd4db4f6e05d66f1f437d9d24566ff6af44650f (diff)
downloadlinux-stable-f4b3aa7cd9d32407670e67238c5ee752bb98f481.tar.gz
linux-stable-f4b3aa7cd9d32407670e67238c5ee752bb98f481.tar.bz2
linux-stable-f4b3aa7cd9d32407670e67238c5ee752bb98f481.zip
MIPS: Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64
Allow 64-bit userspace programs to use ll64 types. The define name comes from commit 2c9c6ce0199a4d252e20c531cfdc9d24e39235c0 (powerpc: Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64). The patch allows to compile perf on MIPS64 and eliminates the following warnings: tests/attr.c:74:4: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64' [-Werror=format=] Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/6890/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/uapi')
-rw-r--r--arch/mips/include/uapi/asm/types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/include/uapi/asm/types.h b/arch/mips/include/uapi/asm/types.h
index 7ac9d0baad84..f3dd9ff0cc0c 100644
--- a/arch/mips/include/uapi/asm/types.h
+++ b/arch/mips/include/uapi/asm/types.h
@@ -14,9 +14,12 @@
/*
* We don't use int-l64.h for the kernel anymore but still use it for
* userspace to avoid code changes.
+ *
+ * However, some user programs (e.g. perf) may not want this. They can
+ * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
*/
#ifndef __KERNEL__
-# if _MIPS_SZLONG == 64
+# if _MIPS_SZLONG == 64 && !defined(__SANE_USERSPACE_TYPES__)
# include <asm-generic/int-l64.h>
# else
# include <asm-generic/int-ll64.h>