linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf arm pmu: fix build error on MUSL libc
@ 2020-12-06 14:45 Chanho Park
  2020-12-07 10:53 ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Chanho Park @ 2020-12-06 14:45 UTC (permalink / raw)
  To: mathieu.poirier, suzuki.poulose
  Cc: Mark Rutland, Peter Zijlstra, Jiri Olsa, coresight, John Garry,
	linux-kernel, Arnaldo Carvalho de Melo, Khem Raj, Ingo Molnar,
	Leo Yan, Namhyung Kim, Chanho Park, Will Deacon, linux-arm-kernel,
	Mike Leach

__always_inline can cause build error on musl libc. The fix patch has
submitted but not merged yet[1]. To build perf tool with musl libc,
<linux/stddef.h> inclusion is necessary and it should be included before
perf_event.h.

from /usr/include/linux/byteorder/little_endian.h:13,
from /usr/include/asm/byteorder.h:23,
from tools/include/uapi/linux/perf_event.h:20,
from arch/arm64/util/../../arm/util/pmu.c:9:

/usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline'
  171 | static __always_inline __u16 __swab16p(const __u16 *p)
      |        ^~~~~~~~~~~~~~~

[1]: https://lkml.org/lkml/2018/9/13/78
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
 tools/perf/arch/arm/util/pmu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
index bbc297a7e2e3..4c0357e8c0ab 100644
--- a/tools/perf/arch/arm/util/pmu.c
+++ b/tools/perf/arch/arm/util/pmu.c
@@ -6,6 +6,9 @@
 
 #include <string.h>
 #include <linux/coresight-pmu.h>
+#if !defined(__GLIBC__)
+#include <linux/stddef.h>
+#endif
 #include <linux/perf_event.h>
 #include <linux/string.h>
 
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-12-08  9:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-06 14:45 [PATCH] perf arm pmu: fix build error on MUSL libc Chanho Park
2020-12-07 10:53 ` Will Deacon
2020-12-07 11:58   ` Chanho Park
2020-12-07 12:31     ` Namhyung Kim
2020-12-07 13:28       ` Jiri Olsa
2020-12-08  9:54         ` Chanho Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).