All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: __builtin_return_address works with argument 0
@ 2009-05-13  9:00 ` Uwe Kleine-König
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2009-05-13  9:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-rt-users, Thomas Gleixner

This saves the function overhead for CALLER_ADDRESS0.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
Hi Thomas,

this applies to .29.3-rt12.  Feel free to squash this into
arm-tracing-updates.patch.

Best regards
Uwe

 arch/arm/include/asm/ftrace.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 900fc19..f7e8bac 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -15,7 +15,7 @@ extern void mcount(void);
 void *return_address(unsigned int);
 
 #define HAVE_ARCH_CALLER_ADDR
-#define CALLER_ADDR0 ((unsigned long)return_address(0))
+#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
 #define CALLER_ADDR1 ((unsigned long)return_address(1))
 #define CALLER_ADDR2 ((unsigned long)return_address(2))
 #define CALLER_ADDR3 ((unsigned long)return_address(3))
-- 
1.6.2.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: __builtin_return_address works with argument 0
@ 2009-05-13  9:00 ` Uwe Kleine-König
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2009-05-13  9:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-rt-users, Thomas Gleixner

This saves the function overhead for CALLER_ADDRESS0.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
Hi Thomas,

this applies to .29.3-rt12.  Feel free to squash this into
arm-tracing-updates.patch.

Best regards
Uwe

 arch/arm/include/asm/ftrace.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 900fc19..f7e8bac 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -15,7 +15,7 @@ extern void mcount(void);
 void *return_address(unsigned int);
 
 #define HAVE_ARCH_CALLER_ADDR
-#define CALLER_ADDR0 ((unsigned long)return_address(0))
+#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
 #define CALLER_ADDR1 ((unsigned long)return_address(1))
 #define CALLER_ADDR2 ((unsigned long)return_address(2))
 #define CALLER_ADDR3 ((unsigned long)return_address(3))
-- 
1.6.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: __builtin_return_address works with argument 0
  2009-05-13  9:00 ` Uwe Kleine-König
@ 2009-05-13 13:03   ` Sujit Karataparambil
  -1 siblings, 0 replies; 4+ messages in thread
From: Sujit Karataparambil @ 2009-05-13 13:03 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel, linux-rt-users, Thomas Gleixner

These seem to be required too. Mostly for optimizations the compiler can
provide. Seem to be supported in gnu.

__builtin_clz
__builtin_constant_p
__builtin_expect
__builtin_frame_address

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0376a/Caceiddh.html



2009/5/13 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> This saves the function overhead for CALLER_ADDRESS0.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---
> Hi Thomas,
>
> this applies to .29.3-rt12.  Feel free to squash this into
> arm-tracing-updates.patch.
>
> Best regards
> Uwe
>
>  arch/arm/include/asm/ftrace.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
> index 900fc19..f7e8bac 100644
> --- a/arch/arm/include/asm/ftrace.h
> +++ b/arch/arm/include/asm/ftrace.h
> @@ -15,7 +15,7 @@ extern void mcount(void);
>  void *return_address(unsigned int);
>
>  #define HAVE_ARCH_CALLER_ADDR
> -#define CALLER_ADDR0 ((unsigned long)return_address(0))
> +#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
>  #define CALLER_ADDR1 ((unsigned long)return_address(1))
>  #define CALLER_ADDR2 ((unsigned long)return_address(2))
>  #define CALLER_ADDR3 ((unsigned long)return_address(3))
> --
> 1.6.2.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
-- Sujit K M

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: __builtin_return_address works with argument 0
@ 2009-05-13 13:03   ` Sujit Karataparambil
  0 siblings, 0 replies; 4+ messages in thread
From: Sujit Karataparambil @ 2009-05-13 13:03 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel, linux-rt-users, Thomas Gleixner

These seem to be required too. Mostly for optimizations the compiler can
provide. Seem to be supported in gnu.

__builtin_clz
__builtin_constant_p
__builtin_expect
__builtin_frame_address

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0376a/Caceiddh.html



2009/5/13 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> This saves the function overhead for CALLER_ADDRESS0.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---
> Hi Thomas,
>
> this applies to .29.3-rt12.  Feel free to squash this into
> arm-tracing-updates.patch.
>
> Best regards
> Uwe
>
>  arch/arm/include/asm/ftrace.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
> index 900fc19..f7e8bac 100644
> --- a/arch/arm/include/asm/ftrace.h
> +++ b/arch/arm/include/asm/ftrace.h
> @@ -15,7 +15,7 @@ extern void mcount(void);
>  void *return_address(unsigned int);
>
>  #define HAVE_ARCH_CALLER_ADDR
> -#define CALLER_ADDR0 ((unsigned long)return_address(0))
> +#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
>  #define CALLER_ADDR1 ((unsigned long)return_address(1))
>  #define CALLER_ADDR2 ((unsigned long)return_address(2))
>  #define CALLER_ADDR3 ((unsigned long)return_address(3))
> --
> 1.6.2.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
-- Sujit K M
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-13 13:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13  9:00 [PATCH] ARM: __builtin_return_address works with argument 0 Uwe Kleine-König
2009-05-13  9:00 ` Uwe Kleine-König
2009-05-13 13:03 ` Sujit Karataparambil
2009-05-13 13:03   ` Sujit Karataparambil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.