[PATCH v8 1/8] ftrace: make CALLER_ADDRx macros more generic

Geert Uytterhoeven geert at linux-m68k.org
Wed Jun 11 05:34:50 PDT 2014


On Wed, Apr 30, 2014 at 11:54 AM, AKASHI Takahiro
<takahiro.akashi at linaro.org> wrote:
> Most archs with HAVE_ARCH_CALLER_ADDR have the almost same definitions
> of CALLER_ADDRx(n), and so put them into linux/ftrace.h.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>

On arm (at least shmobile_defconfig and versatile_defconfig) with gcc 4.6.3:

kernel/sched/core.c: In function 'get_parent_ip':
kernel/sched/core.c:2520:10: warning: unsupported argument to
'__builtin_return_address' [enabled by default]
kernel/sched/core.c:2522:11: warning: unsupported argument to
'__builtin_return_address' [enabled by default]

With gcc 4.9.0:

kernel/sched/core.c: In function 'get_parent_ip':
include/linux/ftrace.h:627:36: warning: unsupported argument to
'__builtin_return_address'
 #  define ftrace_return_address(n) __builtin_return_address(n)
                                    ^
include/linux/ftrace.h:635:38: note: in expansion of macro
'ftrace_return_address'
 #define CALLER_ADDR2 ((unsigned long)ftrace_return_address(2))
                                      ^
kernel/sched/core.c:2520:10: note: in expansion of macro 'CALLER_ADDR2'
   addr = CALLER_ADDR2;
          ^
include/linux/ftrace.h:627:36: warning: unsupported argument to
'__builtin_return_address'
 #  define ftrace_return_address(n) __builtin_return_address(n)
                                    ^
include/linux/ftrace.h:636:38: note: in expansion of macro
'ftrace_return_address'
 #define CALLER_ADDR3 ((unsigned long)ftrace_return_address(3))
                                      ^
kernel/sched/core.c:2522:11: note: in expansion of macro 'CALLER_ADDR3'
    addr = CALLER_ADDR3;
           ^

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-arm-kernel mailing list