Re: [PATCH v3 3/3] arm64: implement CPPC FFH support using AMUs

From: Ionela Voinescu
Date: Thu Nov 05 2020 - 09:11:01 EST


Hi Mark,

On Thursday 05 Nov 2020 at 13:28:23 (+0000), Mark Rutland wrote:
[..]
> > +#ifdef CONFIG_ACPI_CPPC_LIB
> > +#include <acpi/cppc_acpi.h>
>
> As mentioned on patch 1, I think it'd be better to open-code the smp
> call functions here, e.g.
>
> static void cpu_read_corecnt(void *val)
> {
> *(u64 *)val = read_corecnt()
> }
>
> static void cpu_read_constcnt(void *val)
> {
> *(u64 *)val = read_constcnt()
> }
>
> ... as they're only needed here and it's much clearer what they're
> doing in-context. I think that would als oget rid of the warning you
> mention in the cover letter.
>

Many thanks for the review. I was tempted by the fewer lines of code of
the macro, for that very simple functionality of the counter reads, but
your arguments against it make sense.

I'll change this and 1/3 and push v4 later today.

Regards,
Ionela.