diff options
author | Andrey Konovalov <andrey.konovalov@linaro.org> | 2012-12-13 19:55:47 +0400 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2012-12-13 19:55:47 +0400 |
commit | f271ce83da7b1111c756814ed7f479c50ae6f380 (patch) | |
tree | 6b7f0c9bcb8b14f2f049dd57d936190895d746e9 | |
parent | 329572c98a7406bd34228dbb1d424bad7acf3e20 (diff) | |
parent | 05a789f13dad6247198edc55423be09236411b76 (diff) |
Merge branch 'tracking-ll-v3.7-misc-fixes' into merge-linux-linarosamsung-linux-3.7-2012.12ll-20121213.0
-rw-r--r-- | arch/arm/include/asm/bitsperlong.h | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/bitsperlong.h | 1 | ||||
-rw-r--r-- | tools/perf/compat-android.h | 29 | ||||
-rw-r--r-- | tools/perf/util/pager.c | 1 | ||||
-rw-r--r-- | tools/perf/util/util.h | 2 |
5 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/include/asm/bitsperlong.h b/arch/arm/include/asm/bitsperlong.h new file mode 100644 index 000000000000..6dc0bb0c13b2 --- /dev/null +++ b/arch/arm/include/asm/bitsperlong.h @@ -0,0 +1 @@ +#include <asm-generic/bitsperlong.h> diff --git a/arch/arm64/include/asm/bitsperlong.h b/arch/arm64/include/asm/bitsperlong.h new file mode 100644 index 000000000000..6dc0bb0c13b2 --- /dev/null +++ b/arch/arm64/include/asm/bitsperlong.h @@ -0,0 +1 @@ +#include <asm-generic/bitsperlong.h> diff --git a/tools/perf/compat-android.h b/tools/perf/compat-android.h index b8fb93679329..fce9573d257b 100644 --- a/tools/perf/compat-android.h +++ b/tools/perf/compat-android.h @@ -20,13 +20,35 @@ #ifndef _COMPAT_ANDROID_H_ #define _COMPAT_ANDROID_H_ 1 +/* Stuff Bionic assumes to be present, but that doesn't exist + * anymore after the uabi kernel header reorg + */ +#include <stdint.h> +#include <stdbool.h> +typedef unsigned short __kernel_nlink_t; +typedef intptr_t phys_addr_t; +#include <linux/types.h> +typedef uint32_t u32; +typedef uint64_t u64; +#ifndef CONFIG_DRAM_BASEUL +#ifdef CONFIG_DRAM_BASE +#define CONFIG_DRAM_BASEUL UL(CONFIG_DRAM_BASE) +#else +#define CONFIG_DRAM_BASEUL 0 +#endif +#endif +#define __deprecated +#include <asm-generic/bitsperlong.h> + +#undef BITS_PER_LONG /* Something seems to define this incorrectly */ +#define BITS_PER_LONG _BITSIZE + #include <stdio.h> #include <signal.h> #include <asm/page.h> /* for PAGE_SIZE */ #include <asm/termios.h> /* for winsize */ #ifndef __WORDSIZE -#include <stdint.h> #define __WORDSIZE _BITSIZE #endif @@ -42,6 +64,11 @@ #define __le32 uint32_t #endif +#ifndef FD_SET +#define FD_SET(fd, fdsetp) (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31))) +#define FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof (*(fd_set *)(fdsetp)))) +#endif + /* Assorted functions that are missing from Bionic */ /* Android prior to 4.2 lacks psignal(). * What we're doing here is fairly evil - but necessary since diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c index 3322b8446e89..cd543418c721 100644 --- a/tools/perf/util/pager.c +++ b/tools/perf/util/pager.c @@ -1,6 +1,7 @@ #include "cache.h" #include "run-command.h" #include "sigchain.h" +#include <sys/select.h> /* * This is split up from the rest of git so that we can do diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 10e8a478ae4c..ebee70529cdc 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -253,11 +253,13 @@ void event_attr_init(struct perf_event_attr *attr); * *not* considered a power of two. */ +#ifndef _LINUX_LOG2_H // defined there too static inline __attribute__((const)) bool is_power_of_2(unsigned long n) { return (n != 0 && ((n & (n - 1)) == 0)); } +#endif size_t hex_width(u64 v); |