Re: [PATCH 0/2] ARM/arm64: Mark all accessor functions inline

Marc Zyngier
2023-05-09T07:42:26Z

Hi Geert,

On Mon, 08 May 2023 17:05:17 +0100,
Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>
> Hi all,
>
> This patch series adds missing "inline" keywords to the few perf
> accessors that lack them.

I'll get to that shortly.

>
> BTW, I tried converting my local timing code to the new unified system.
> This works fine on arm64, but broke on arm32. Is read_pmccntr()
> supposed to work on arm32? I get an undefined instruction exception on
> Cortex A15 and A9. Before, my custom code used "mrc p15, 0, %0, c9,
> c13, 0" (as is also used in arch/arm/kernel/perf_event_v7.c), for which
> there is no accessor yet.

You can only use this instruction on a CPU that implements PMUv3,
which limits it to an ARMv8 implementation (either a 64bit CPU in
32bit mode, or something like an A32). A15 and A9 being firmly in the
ARMv7 camp, they cannot make use of this (hence the UNDEF you're
getting).

Thanks,

M.

--
Without deviation from the norm, progress is not possible.