Skip to contentSkip to conversation

perf: powerpc: Fix compile errors in bp_signal files

PATCH In review Sukadev Bhattiprolu 3 participants 3 messages Apr 26, 2013 – May 31, 2013 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: powerpc: Fix compile errors in bp_signal files

Quoted 1 line

From 0e27e218def9ae630cc07efbd21664c150a3727a Mon Sep 17 00:00:00 2001

From: Sukadev Bhattiprolu <[email protected]>
Date: Fri, 26 Apr 2013 10:17:56 -0700
Subject: [PATCH] perf: powerpc: Fix compile errors in bp_signal files

When building on powerpc, we get compile errors in bp_signal.c and bp_signal_overflow.c due to __u64 and '%llx'.

Powerpc, needs __SANE_USERSPACE_TYPES__ to be defined so we pick up <asm-generic/int-ll64.h> and define __u64 as unsigned long long.

---
 tools/perf/tests/bp_signal.c          |    6 ++++++
 tools/perf/tests/bp_signal_overflow.c |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
tools/perf/tests/bp_signal.c +6 -0
index 68daa28..aba0954 100644
@@ -4,6 +4,12 @@
  * (git://github.com/deater/perf_event_tests)
  */
 
+/*
+ * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
+ * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
tools/perf/tests/bp_signal_overflow.c +6 -0
index fe7ed28..44ac821 100644
@@ -3,6 +3,12 @@
  * perf_event_tests (git://github.com/deater/perf_event_tests)
  */
 
+/*
+ * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
+ * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Sukadev Bhattiprolu

From 0e27e218def9ae630cc07efbd21664c150a3727a Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Fri, 26 Apr 2013 10:17:56 -0700
Subject: [PATCH] perf: powerpc: Fix compile errors in bp_signal files

When building on powerpc, we get compile errors in bp_signal.c and bp_signal_overflow.c due to __u64 and '%llx'.

Powerpc, needs __SANE_USERSPACE_TYPES__ to be defined so we pick up <asm-generic/int-ll64.h> and define __u64 as unsigned long long.

matches the use in tests/attr.c

thanks,
jirka

Quoted 44 lines
---
 tools/perf/tests/bp_signal.c          |    6 ++++++
 tools/perf/tests/bp_signal_overflow.c |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
tools/perf/tests/bp_signal.c +6 -0
index 68daa28..aba0954 100644
@@ -4,6 +4,12 @@
  * (git://github.com/deater/perf_event_tests)
  */
 
+/*
+ * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
+ * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
tools/perf/tests/bp_signal_overflow.c +6 -0
index fe7ed28..44ac821 100644
@@ -3,6 +3,12 @@
  * perf_event_tests (git://github.com/deater/perf_event_tests)
  */
 
+/*
+ * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
+ * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
Signature · 1 line
1.7.1
#2 lore raw

[tip:perf/core] perf tests: Fix compile errors in bp_signal files

In reply to Sukadev Bhattiprolu
perf tests: Fix compile errors in bp_signal files
Commit-ID:  b3539d214f6000217aae97b5ae32df5b03faf850
Gitweb:     http://git.kernel.org/tip/b3539d214f6000217aae97b5ae32df5b03faf850
Author:     Sukadev Bhattiprolu <[email protected]>
AuthorDate: Fri, 26 Apr 2013 10:17:56 -0700
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 28 May 2013 16:23:57 +0300

perf tests: Fix compile errors in bp_signal files

When building on powerpc, we get compile errors in bp_signal.c and bp_signal_overflow.c due to __u64 and '%llx'.

Powerpc, needs __SANE_USERSPACE_TYPES__ to be defined so we pick up <asm-generic/int-ll64.h> and define __u64 as unsigned long long.

---
 tools/perf/tests/bp_signal.c          | 6 ++++++
 tools/perf/tests/bp_signal_overflow.c | 6 ++++++
 2 files changed, 12 insertions(+)
tools/perf/tests/bp_signal.c +6 -0
index 68daa28..aba0954 100644
@@ -4,6 +4,12 @@
  * (git://github.com/deater/perf_event_tests)
  */
 
+/*
+ * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
+ * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
tools/perf/tests/bp_signal_overflow.c +6 -0
index fe7ed28..44ac821 100644
@@ -3,6 +3,12 @@
  * perf_event_tests (git://github.com/deater/perf_event_tests)
  */
 
+/*
+ * Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
+ * 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>