From patchwork Sun Dec 6 14:45:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 11954139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1856C4361B for ; Sun, 6 Dec 2020 14:47:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91F8A2311B for ; Sun, 6 Dec 2020 14:47:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91F8A2311B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=6LOBiSHdwYMEzx0abkF/7R5ME9GpUhASv8ACvu27MxM=; b=hgqppqvsDcEIt9MqnOW5ow23dl WC5BazgYVMIMjugPUKa2byfH3+P0oSchRejL7OYfuDaMSbg7P7+ps7LqrneoA5G/kqclNQB8s2ym6 ZoOJ/uQLdGnnSiHF10jNcVUI/sVRINQw/5c8xd41KbV0LN5eq1VqBAoC9Btu082ki73cRR2yXNvgJ HMxdzCKvSPjxV7ZwBecOWE0j3sDUSiIuUk9UiUllZ9048VJuV5QyS2GJuBQtfHahm+zZZa08Lwvnl ZSj39C4UENcoykocRqXRtmouTRrYYel91BRso/C32R1eb6oXjyzf5C9zzJXY5nFZyooQwKKmRUAMT po6lKu/w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1klvIL-00080x-5C; Sun, 06 Dec 2020 14:45:49 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1klvII-00080L-8i for linux-arm-kernel@lists.infradead.org; Sun, 06 Dec 2020 14:45:47 +0000 Received: by mail-pf1-x442.google.com with SMTP id c12so182032pfo.10 for ; Sun, 06 Dec 2020 06:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SgrteoBjIXT5D4oog+tLO0lptvXOH+8Koop0iBKuuxo=; b=s0JvZIEO2/DWbBrS5Oo04bq7AWes0nVmt/2God9p9lt945/3IWynniwYrRoK9/LGst xUPgifa1zGcZQlXf8qfRnxRqFjfMyuLRYoFZaeGLhT9PYKbZ1wukM8Scb1wKv6Fk8GBw GVUX07dnFFcazqkpEv8kHHbvnkY7MkJcSVd2ZyenlUuDvnDgDTcNnNGjLAbJYRubMBte 0z+GUTyvF+UeG3mS9wF0K6k6B3tEX6mjoGLCWfh6naBAd4IHHVJ84vo6yTpgA58CWKAZ YrMFPpLgnJgYM+CEidoBbRmS8dZSzOw4rMprUhjxhbD8gvm8fnBcVH21PL6ky5l7/S2F nacw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SgrteoBjIXT5D4oog+tLO0lptvXOH+8Koop0iBKuuxo=; b=CUeka/1EoYkPKngK3KCEbdUmQJR5zb+5Ks6xtC6SflnWWfvuE1G+Uecj4K7AJjxFgM QU7mQo1V1C2qqHnN5mLJNQJeJpoJLIKi55DCgaQDwAFNzLbDRv58mBy4I5LAQ/ybpy4e 5nEkC/P3wgS5vaniWr16lBTM80Mh/g75SKMP5tuF9ximnQTSghl27stLq2b+vEIpGahn ca7k4UuM9/I9zP35nAbS+U4y8DpMOc3otFmnWgIjc+bTUvMjOEo1Oe2KJFf0uTKYcvx3 xPH4pTnOCwTplte0HLjNYw9w3/xAoIiFmwCChrkykH48MW7gQNf2afHqXOHGlaBS0vV4 +l2A== X-Gm-Message-State: AOAM533JA80dwiIGqDYZnWoRmGdmKHIoCaqalHvA3KfTDI8pKdgMA4lL OxCi1ePL5U1TNGDC8K8gZOI= X-Google-Smtp-Source: ABdhPJyEhsgZDdwV4IGYekjuVR/D60yJpp9xj33aYDUtJXLzUcmGCODnYjl7Ii0KERWwd7iBMW1Alw== X-Received: by 2002:a65:6a16:: with SMTP id m22mr15098298pgu.175.1607265940244; Sun, 06 Dec 2020 06:45:40 -0800 (PST) Received: from localhost ([221.153.153.187]) by smtp.gmail.com with ESMTPSA id o198sm10932531pfg.102.2020.12.06.06.45.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Dec 2020 06:45:39 -0800 (PST) From: Chanho Park X-Google-Original-From: Chanho Park To: mathieu.poirier@linaro.org, suzuki.poulose@arm.com Subject: [PATCH] perf arm pmu: fix build error on MUSL libc Date: Sun, 6 Dec 2020 23:45:27 +0900 Message-Id: <20201206144527.1670483-1-chanho61.park@samsung.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201206_094546_348211_C83F649D X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Zijlstra , Jiri Olsa , coresight@lists.linaro.org, John Garry , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Khem Raj , Ingo Molnar , Leo Yan , Namhyung Kim , Chanho Park , Will Deacon , linux-arm-kernel@lists.infradead.org, Mike Leach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org __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, 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 Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Cc: John Garry Cc: Will Deacon Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Jiri Olsa Cc: Namhyung Kim Cc: Khem Raj Signed-off-by: Chanho Park --- 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 #include +#if !defined(__GLIBC__) +#include +#endif #include #include