aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-08-12 15:00:51 -0400
committerChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:52:09 -0400
commit49cf78ef7bb34833496d59b6dfe84ae51b1ab097 (patch)
tree8c4931de01fd8e6e861cf38e520f40ef1e5143f4 /arch/tile
parent80f184108e364ba1d08dd77339966034c9a9243e (diff)
tile: support FRAME_POINTER
Allow enabling frame pointer support; this makes it easier to hook into the various kernel features that claim they require it without having to add Kconfig conditionals everywhere (a la mips, ppc, s390, and microblaze). When enabled, it basically eliminates leaf functions as such, and stops optimizing tail and sibling calls. It adds around 3% to the size of the kernel when enabled. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/Kconfig1
-rw-r--r--arch/tile/lib/Makefile14
-rw-r--r--arch/tile/lib/cacheflush.c3
-rw-r--r--arch/tile/lib/memcpy_64.c3
4 files changed, 12 insertions, 9 deletions
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index de599c14c4f2..b2be42524483 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -26,6 +26,7 @@ config TILE
26 select HAVE_SYSCALL_TRACEPOINTS 26 select HAVE_SYSCALL_TRACEPOINTS
27 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 27 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
28 select HAVE_DEBUG_STACKOVERFLOW 28 select HAVE_DEBUG_STACKOVERFLOW
29 select ARCH_WANT_FRAME_POINTERS
29 30
30# FIXME: investigate whether we need/want these options. 31# FIXME: investigate whether we need/want these options.
31# select HAVE_IOREMAP_PROT 32# select HAVE_IOREMAP_PROT
diff --git a/arch/tile/lib/Makefile b/arch/tile/lib/Makefile
index 5d844374b2b1..9adfd76fbdd8 100644
--- a/arch/tile/lib/Makefile
+++ b/arch/tile/lib/Makefile
@@ -6,13 +6,13 @@ lib-y = cacheflush.o checksum.o cpumask.o delay.o uaccess.o \
6 memmove.o memcpy_$(BITS).o memchr_$(BITS).o memset_$(BITS).o \ 6 memmove.o memcpy_$(BITS).o memchr_$(BITS).o memset_$(BITS).o \
7 strchr_$(BITS).o strlen_$(BITS).o strnlen_$(BITS).o 7 strchr_$(BITS).o strlen_$(BITS).o strnlen_$(BITS).o
8 8
9ifeq ($(CONFIG_TILEGX),y) 9lib-$(CONFIG_TILEGX) += memcpy_user_64.o
10CFLAGS_REMOVE_memcpy_user_64.o = -fno-omit-frame-pointer 10lib-$(CONFIG_TILEPRO) += atomic_32.o atomic_asm_32.o memcpy_tile64.o
11lib-y += memcpy_user_64.o
12else
13lib-y += atomic_32.o atomic_asm_32.o memcpy_tile64.o
14endif
15
16lib-$(CONFIG_SMP) += spinlock_$(BITS).o usercopy_$(BITS).o 11lib-$(CONFIG_SMP) += spinlock_$(BITS).o usercopy_$(BITS).o
17 12
18obj-$(CONFIG_MODULES) += exports.o 13obj-$(CONFIG_MODULES) += exports.o
14
15# The finv_buffer_remote() and copy_{to,from}_user() routines can't
16# have -pg added, since they both rely on being leaf functions.
17CFLAGS_REMOVE_cacheflush.o = -pg
18CFLAGS_REMOVE_memcpy_user_64.o = -pg
diff --git a/arch/tile/lib/cacheflush.c b/arch/tile/lib/cacheflush.c
index 2238b40abf3c..9c0ec22009a5 100644
--- a/arch/tile/lib/cacheflush.c
+++ b/arch/tile/lib/cacheflush.c
@@ -36,7 +36,8 @@ static inline void force_load(char *p)
36 * core (if "!hfh") or homed via hash-for-home (if "hfh"), waiting 36 * core (if "!hfh") or homed via hash-for-home (if "hfh"), waiting
37 * until the memory controller holds the flushed values. 37 * until the memory controller holds the flushed values.
38 */ 38 */
39void finv_buffer_remote(void *buffer, size_t size, int hfh) 39void __attribute__((optimize("omit-frame-pointer")))
40finv_buffer_remote(void *buffer, size_t size, int hfh)
40{ 41{
41 char *p, *base; 42 char *p, *base;
42 size_t step_size, load_count; 43 size_t step_size, load_count;
diff --git a/arch/tile/lib/memcpy_64.c b/arch/tile/lib/memcpy_64.c
index 46fc1600c17d..4815354b8cd2 100644
--- a/arch/tile/lib/memcpy_64.c
+++ b/arch/tile/lib/memcpy_64.c
@@ -54,7 +54,8 @@ void *memcpy(void *__restrict dstv, const void *__restrict srcv, size_t n)
54 * macros to return a count of uncopied bytes due to mm fault. 54 * macros to return a count of uncopied bytes due to mm fault.
55 */ 55 */
56#define RETVAL 0 56#define RETVAL 0
57int USERCOPY_FUNC(void *__restrict dstv, const void *__restrict srcv, size_t n) 57int __attribute__((optimize("omit-frame-pointer")))
58USERCOPY_FUNC(void *__restrict dstv, const void *__restrict srcv, size_t n)
58#endif 59#endif
59{ 60{
60 char *__restrict dst1 = (char *)dstv; 61 char *__restrict dst1 = (char *)dstv;