From f06d19e460cdd326eff955ca614cb8064bd0a5f2 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Fri, 15 Nov 2013 12:08:05 +0530 Subject: ARC: extable: Enable sorting at build time Avoids wasting cycles at boot specially on slower simulators Signed-off-by: Vineet Gupta Cc: Michal Marek Cc: Francois Bedard Cc: linux-kernel@vger.kernel.org Acked-by: David Daney --- arch/arc/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arc') diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 2ee0c9bfd03..9063ae6553c 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -8,6 +8,7 @@ config ARC def_bool y + select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev select DEVTMPFS if !INITRAMFS_SOURCE="" -- cgit v1.2.3 From 97bc386fc12deeb41d5bff33548e3002b258d4e0 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Thu, 21 Nov 2013 15:34:16 +0530 Subject: ARC: Add guard macro to uapi/asm/unistd.h Chen originally proposed this as "right thing to do" however I actually ran into this when building perf tools. Some of the utils include unistd.h as well as linux/unistd.h. Since -I includes kernel headers too, we end up including the ARC unistd.h twice, leading to redefinition nwarnings. ------------------>8------------------- CC bench/sched-pipe.o In file included from ~/kernel/arch/arc/include/uapi/asm/unistd.h:21:0, from ~/kernel/include/uapi/linux/unistd.h:7, from bench/sched-pipe.c:24: ~/kernel/include/uapi/asm-generic/unistd.h:889:0: error: "__NR_fcntl64" redefined [-Werror] #define __NR_fcntl64 __NR3264_fcntl ^ In file included from ~/gnu/arc-linux-uclibc/sys-include/sys/syscall.h:24:0, from bench/../perf.h:112, from bench/sched-pipe.c:13: ~/gnu/arc-linux-uclibc/include/bits/sysnum.h:761:0: note: this is the location of the previous definition ------------------>8------------------- Verified that make headers_install works fine with this. Suggested-by: Chen Gang Signed-off-by: Vineet Gupta Cc: David Howells --- arch/arc/include/uapi/asm/unistd.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arc') diff --git a/arch/arc/include/uapi/asm/unistd.h b/arch/arc/include/uapi/asm/unistd.h index 6f30484f34b..68125dd766c 100644 --- a/arch/arc/include/uapi/asm/unistd.h +++ b/arch/arc/include/uapi/asm/unistd.h @@ -8,6 +8,9 @@ /******** no-legacy-syscalls-ABI *******/ +#ifndef _UAPI_ASM_ARC_UNISTD_H +#define _UAPI_ASM_ARC_UNISTD_H + #define __ARCH_WANT_SYS_EXECVE #define __ARCH_WANT_SYS_CLONE #define __ARCH_WANT_SYS_VFORK @@ -32,3 +35,5 @@ __SYSCALL(__NR_arc_gettls, sys_arc_gettls) /* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */ #define __NR_sysfs (__NR_arch_specific_syscall + 3) __SYSCALL(__NR_sysfs, sys_sysfs) + +#endif -- cgit v1.2.3 From da990a4f2d5a321911026c26c7eeec3bbc6fb7b7 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Thu, 28 Nov 2013 15:49:59 +0530 Subject: ARC: [perf] Fix a few thinkos Signed-off-by: Vineet Gupta --- arch/arc/kernel/perf_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arc') diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index e46d81f7097..63177e4cb66 100644 --- a/arch/arc/kernel/perf_event.c +++ b/arch/arc/kernel/perf_event.c @@ -79,9 +79,9 @@ static int arc_pmu_cache_event(u64 config) cache_result = (config >> 16) & 0xff; if (cache_type >= PERF_COUNT_HW_CACHE_MAX) return -EINVAL; - if (cache_type >= PERF_COUNT_HW_CACHE_OP_MAX) + if (cache_op >= PERF_COUNT_HW_CACHE_OP_MAX) return -EINVAL; - if (cache_type >= PERF_COUNT_HW_CACHE_RESULT_MAX) + if (cache_result >= PERF_COUNT_HW_CACHE_RESULT_MAX) return -EINVAL; ret = arc_pmu_cache_map[cache_type][cache_op][cache_result]; -- cgit v1.2.3