From: Marc Zyngier <maz@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: arch/arm64/kvm/perf.c:58:36: error: implicit declaration of function 'perf_num_counters'
Date: Wed, 14 Apr 2021 11:12:26 +0100 [thread overview]
Message-ID: <87o8ehmayd.wl-maz@kernel.org> (raw)
In-Reply-To: <20210413200057.ankb4e26ytgal7ev@archlinux-ax161>
[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]
On Tue, 13 Apr 2021 21:00:57 +0100,
Nathan Chancellor <nathan@kernel.org> wrote:
[...]
> I just ran into this again. It is not a clang specific issue, it
> reproduces quite easily with arm64 defconfig minus CONFIG_PERF_EVENTS
> and gcc 10.3.0:
>
> arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> arch/arm64/kvm/perf.c:58:36: error: implicit declaration of function
> 'perf_num_counters'; did you mean 'dec_mm_counter'?
> [-Werror=implicit-function-declaration]
> 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0)
> | ^~~~~~~~~~~~~~~~~
> | dec_mm_counter
> cc1: some warnings being treated as errors
>
> I am not sure what the cleanest solution would be for providing a static
> inline version of perf_num_counters() would be, as only arm64 actually
> uses it (sh and s390 define it but it does not appear to be used) but it
> is only available through CONFIG_ARM_PMU instead of just
> CONFIG_PERF_EVENTS like the other two architectures mentioned above.
As you point out, KVM/arm64 is the only user of perf_num_counters()
across the whole kernel. The whole oprofile subsystem has been
removed, so maybe a a bigger cleanup is in order.
I'll post something shortly.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Alexandru Elisei <alexandru.elisei@arm.com>
Subject: Re: arch/arm64/kvm/perf.c:58:36: error: implicit declaration of function 'perf_num_counters'
Date: Wed, 14 Apr 2021 11:12:26 +0100 [thread overview]
Message-ID: <87o8ehmayd.wl-maz@kernel.org> (raw)
In-Reply-To: <20210413200057.ankb4e26ytgal7ev@archlinux-ax161>
On Tue, 13 Apr 2021 21:00:57 +0100,
Nathan Chancellor <nathan@kernel.org> wrote:
[...]
> I just ran into this again. It is not a clang specific issue, it
> reproduces quite easily with arm64 defconfig minus CONFIG_PERF_EVENTS
> and gcc 10.3.0:
>
> arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> arch/arm64/kvm/perf.c:58:36: error: implicit declaration of function
> 'perf_num_counters'; did you mean 'dec_mm_counter'?
> [-Werror=implicit-function-declaration]
> 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0)
> | ^~~~~~~~~~~~~~~~~
> | dec_mm_counter
> cc1: some warnings being treated as errors
>
> I am not sure what the cleanest solution would be for providing a static
> inline version of perf_num_counters() would be, as only arm64 actually
> uses it (sh and s390 define it but it does not appear to be used) but it
> is only available through CONFIG_ARM_PMU instead of just
> CONFIG_PERF_EVENTS like the other two architectures mentioned above.
As you point out, KVM/arm64 is the only user of perf_num_counters()
across the whole kernel. The whole oprofile subsystem has been
removed, so maybe a a bigger cleanup is in order.
I'll post something shortly.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2021-04-14 10:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 12:27 arch/arm64/kvm/perf.c:58:36: error: implicit declaration of function 'perf_num_counters' kernel test robot
2021-03-26 12:27 ` kernel test robot
2021-04-13 20:00 ` Nathan Chancellor
2021-04-13 20:00 ` Nathan Chancellor
2021-04-14 10:12 ` Marc Zyngier [this message]
2021-04-14 10:12 ` Marc Zyngier
2021-04-14 10:16 ` Alexandru Elisei
2021-04-14 10:16 ` Alexandru Elisei
-- strict thread matches above, loose matches on Subject: below --
2021-03-26 3:54 kernel test robot
2021-03-26 3:54 ` kernel test robot
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=87o8ehmayd.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.