[PATCH v1] perf: starfive: fix 64-bit only COMPILE_TEST condition
Will Deacon
will at kernel.org
Tue Mar 19 08:56:16 PDT 2024
On Mon, Mar 18, 2024 at 03:35:04PM +0000, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley at microchip.com>
>
> ARCH_STARFIVE is not restricted to 64-bit platforms, so while Will's
> addition of a 64-bit only condition satisfied the build robots doing
> COMPILE_TEST builds, Palmer ran into the same problems with writeq()
> being undefined during regular rv32 builds.
>
> Promote the dependency on 64-bit to its own `depends on` so that the
> driver can never be included in 32-bit builds.
>
> Reported-by: Palmer Dabbelt <palmer at rivosinc.com>
> Fixes: c2b24812f7bc ("perf: starfive: Add StarLink PMU support")
> Fixes: f0dbc6d0de38 ("perf: starfive: Only allow COMPILE_TEST for 64-bit architectures")
> Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
> ---
> CC: Will Deacon <will at kernel.org>
> CC: Mark Rutland <mark.rutland at arm.com>
> CC: Ji Sheng Teoh <jisheng.teoh at starfivetech.com>
> CC: linux-arm-kernel at lists.infradead.org
> CC: linux-kernel at vger.kernel.org
> ---
> drivers/perf/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
> index 5060e1f1ea10..7526a9e714fa 100644
> --- a/drivers/perf/Kconfig
> +++ b/drivers/perf/Kconfig
> @@ -87,7 +87,8 @@ config RISCV_PMU_SBI
> filtering, counter configuration.
>
> config STARFIVE_STARLINK_PMU
> - depends on ARCH_STARFIVE || (COMPILE_TEST && 64BIT)
> + depends on ARCH_STARFIVE || COMPILE_TEST
> + depends on 64BIT
> bool "StarFive StarLink PMU"
> help
> Provide support for StarLink Performance Monitor Unit.
> --
> 2.43.0
Thanks guys, I don't know what a starfive is so sorry for not spotting
this when I noticed the build failure on arm64.
Acked-by: Will Deacon <will at kernel.org>
Catalin -- please can you pick this into the arm64 fixes branch for -rc1?
Cheers,
Will
More information about the linux-riscv
mailing list