From: Will Deacon <will@kernel.org>
To: Chanho Park <parkch98@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
mathieu.poirier@linaro.org, suzuki.poulose@arm.com,
Peter Zijlstra <peterz@infradead.org>,
coresight@lists.linaro.org, John Garry <john.garry@huawei.com>,
linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Khem Raj <raj.khem@gmail.com>, Ingo Molnar <mingo@redhat.com>,
Leo Yan <leo.yan@linaro.org>, Namhyung Kim <namhyung@kernel.org>,
Chanho Park <chanho61.park@samsung.com>,
Jiri Olsa <jolsa@redhat.com>,
linux-arm-kernel@lists.infradead.org,
Mike Leach <mike.leach@linaro.org>
Subject: Re: [PATCH] perf arm pmu: fix build error on MUSL libc
Date: Mon, 7 Dec 2020 10:53:59 +0000 [thread overview]
Message-ID: <20201207105359.GA4198@willie-the-truck> (raw)
In-Reply-To: <20201206144527.1670483-1-chanho61.park@samsung.com>
On Sun, Dec 06, 2020 at 11:45:27PM +0900, Chanho Park wrote:
> __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
Looks like other files just include this unconditionally, but have a comment
explaining why. See util/branch.h and util/event.h. Maybe we should do the
same for util/pmu.h, which is already included here?
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-12-07 10:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-06 14:45 [PATCH] perf arm pmu: fix build error on MUSL libc Chanho Park
2020-12-07 10:53 ` Will Deacon [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201207105359.GA4198@willie-the-truck \
--to=will@kernel.org \
--cc=acme@kernel.org \
--cc=chanho61.park@samsung.com \
--cc=coresight@lists.linaro.org \
--cc=john.garry@huawei.com \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=parkch98@gmail.com \
--cc=peterz@infradead.org \
--cc=raj.khem@gmail.com \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox