From: Mark Brown broonie@linaro.org
Having the typedef in place for the tracepoints causes compiler crashes in some situations. Just using void * directly avoids triggering the issue and should have no effect on the trace.
Signed-off-by: Mark Brown broonie@linaro.org --- include/trace/events/smp.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/trace/events/smp.h b/include/trace/events/smp.h index c8abfd7..da0baf2 100644 --- a/include/trace/events/smp.h +++ b/include/trace/events/smp.h @@ -5,11 +5,10 @@ #define _TRACE_SMP_H
#include <linux/tracepoint.h> -typedef void (*__smp_call_func_t)(void *info);
DECLARE_EVENT_CLASS(smp_call_class,
- TP_PROTO(__smp_call_func_t fnc), + TP_PROTO(void * fnc),
TP_ARGS(fnc),
@@ -35,7 +34,7 @@ DECLARE_EVENT_CLASS(smp_call_class, */ DEFINE_EVENT(smp_call_class, smp_call_func_entry,
- TP_PROTO(__smp_call_func_t fnc), + TP_PROTO(void * fnc),
TP_ARGS(fnc) ); @@ -51,7 +50,7 @@ DEFINE_EVENT(smp_call_class, smp_call_func_entry, */ DEFINE_EVENT(smp_call_class, smp_call_func_exit,
- TP_PROTO(__smp_call_func_t fnc), + TP_PROTO(void * fnc),
TP_ARGS(fnc) ); @@ -67,7 +66,7 @@ DEFINE_EVENT(smp_call_class, smp_call_func_exit, */ TRACE_EVENT(smp_call_func_send,
- TP_PROTO(__smp_call_func_t func, int dest), + TP_PROTO(void * func, int dest),
TP_ARGS(func, dest),
On Mon, Oct 14, 2013 at 12:42:28PM +0100, Mark Brown wrote:
From: Mark Brown broonie@linaro.org
Having the typedef in place for the tracepoints causes compiler crashes in some situations. Just using void * directly avoids triggering the issue and should have no effect on the trace.
Signed-off-by: Mark Brown broonie@linaro.org
Acked-by: Liviu Dudau Liviu.Dudau@arm.com
Does this issue only trigger with a version of gcc earlier than 4.8.1?
Best regards, Liviu
include/trace/events/smp.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/trace/events/smp.h b/include/trace/events/smp.h index c8abfd7..da0baf2 100644 --- a/include/trace/events/smp.h +++ b/include/trace/events/smp.h @@ -5,11 +5,10 @@ #define _TRACE_SMP_H #include <linux/tracepoint.h> -typedef void (*__smp_call_func_t)(void *info); DECLARE_EVENT_CLASS(smp_call_class,
- TP_PROTO(__smp_call_func_t fnc),
- TP_PROTO(void * fnc),
TP_ARGS(fnc), @@ -35,7 +34,7 @@ DECLARE_EVENT_CLASS(smp_call_class, */ DEFINE_EVENT(smp_call_class, smp_call_func_entry,
- TP_PROTO(__smp_call_func_t fnc),
- TP_PROTO(void * fnc),
TP_ARGS(fnc) ); @@ -51,7 +50,7 @@ DEFINE_EVENT(smp_call_class, smp_call_func_entry, */ DEFINE_EVENT(smp_call_class, smp_call_func_exit,
- TP_PROTO(__smp_call_func_t fnc),
- TP_PROTO(void * fnc),
TP_ARGS(fnc) ); @@ -67,7 +66,7 @@ DEFINE_EVENT(smp_call_class, smp_call_func_exit, */ TRACE_EVENT(smp_call_func_send,
- TP_PROTO(__smp_call_func_t func, int dest),
- TP_PROTO(void * func, int dest),
TP_ARGS(func, dest), -- 1.8.4.rc3
On 14 October 2013 13:58, Liviu.Dudau@arm.com wrote:
Does this issue only trigger with a version of gcc earlier than 4.8.1?
No, the 13.09 toolchain is 4.8.2 based and fails, the 13.05 one doesn't trigger the issue and is 4.8.1 based. Without understanding the trigger it's not clear where the bug lies though - it's only triggered with some configs so the underlying cause could be present in 4.8.1 but masked by other changes or it may be Linaro specific.
Hi Mark,
Pretty strange to have a compiler bug like this, but I'm happy with the change. Did you raise it against the toolchain?
--Chris
-----Original Message----- From: Mark Brown [mailto:broonie@kernel.org] Sent: 14 October 2013 12:42 To: Liviu Dudau; Chris Redpath; Jon Medhurst; Alex Shi Cc: linaro-kernel@lists.linaro.org; Mark Brown Subject: [PATCH] smp: Don't use typedef to work around compiler issue with tracepoints
From: Mark Brown broonie@linaro.org
Having the typedef in place for the tracepoints causes compiler crashes in some situations. Just using void * directly avoids triggering the issue and should have no effect on the trace.
Signed-off-by: Mark Brown broonie@linaro.org
include/trace/events/smp.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/trace/events/smp.h b/include/trace/events/smp.h index c8abfd7..da0baf2 100644 --- a/include/trace/events/smp.h +++ b/include/trace/events/smp.h @@ -5,11 +5,10 @@ #define _TRACE_SMP_H
#include <linux/tracepoint.h> -typedef void (*__smp_call_func_t)(void *info);
DECLARE_EVENT_CLASS(smp_call_class,
TP_PROTO(__smp_call_func_t fnc),
TP_PROTO(void * fnc), TP_ARGS(fnc),
@@ -35,7 +34,7 @@ DECLARE_EVENT_CLASS(smp_call_class, */ DEFINE_EVENT(smp_call_class, smp_call_func_entry,
TP_PROTO(__smp_call_func_t fnc),
TP_PROTO(void * fnc), TP_ARGS(fnc)
); @@ -51,7 +50,7 @@ DEFINE_EVENT(smp_call_class, smp_call_func_entry, */ DEFINE_EVENT(smp_call_class, smp_call_func_exit,
TP_PROTO(__smp_call_func_t fnc),
TP_PROTO(void * fnc), TP_ARGS(fnc)
); @@ -67,7 +66,7 @@ DEFINE_EVENT(smp_call_class, smp_call_func_exit, */ TRACE_EVENT(smp_call_func_send,
TP_PROTO(__smp_call_func_t func, int dest),
TP_PROTO(void * func, int dest), TP_ARGS(func, dest),
-- 1.8.4.rc3
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782
On 15 October 2013 11:06, Chris Redpath Chris.Redpath@arm.com wrote:
Pretty strange to have a compiler bug like this, but I'm happy with the change. Did you raise it against the toolchain?
Yes, there's a bug been filed for it.
linaro-kernel@lists.linaro.org