diff mbox series

[1/2] core/test/run-trace: fix on ppc64el

Message ID 20180419055059.11386-1-stewart@linux.ibm.com
State Accepted
Headers show
Series [1/2] core/test/run-trace: fix on ppc64el | expand

Commit Message

Stewart Smith April 19, 2018, 5:50 a.m. UTC
Hackish fix from benh

Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 core/trace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stewart Smith April 19, 2018, 6:25 a.m. UTC | #1
Stewart Smith <stewart@linux.ibm.com> writes:
> Hackish fix from benh
>
> Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
> ---
>  core/trace.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Series merged as of 5307c0ec789991a473023509da03533c6d4779e2
diff mbox series

Patch

diff --git a/core/trace.c b/core/trace.c
index 4364aea57d1d..ef7c2ca05ae1 100644
--- a/core/trace.c
+++ b/core/trace.c
@@ -127,7 +127,8 @@  void trace_add(union trace *trace, u8 type, u16 len)
 	assert(trace->hdr.type != TRACE_OVERFLOW);
 #endif
 	/* Skip traces not enabled in the debug descriptor */
-	if (!((1ul << trace->hdr.type) & debug_descriptor.trace_mask))
+	if (trace->hdr.type < (8 * sizeof(debug_descriptor.trace_mask)) &&
+	    !((1ul << trace->hdr.type) & debug_descriptor.trace_mask))
 		return;
 
 	trace->hdr.timestamp = cpu_to_be64(mftb());