[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o8ehmayd.wl-maz@kernel.org>
Date: Wed, 14 Apr 2021 11:12:26 +0100
From: Marc Zyngier <maz@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: kernel test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
clang-built-linux@...glegroups.com, linux-kernel@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>,
Alexandru Elisei <alexandru.elisei@....com>
Subject: Re: arch/arm64/kvm/perf.c:58:36: error: implicit declaration of function 'perf_num_counters'
On Tue, 13 Apr 2021 21:00:57 +0100,
Nathan Chancellor <nathan@...nel.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.
Powered by blists - more mailing lists