Re: [PATCH] firmware: stratix10-svc: build only on 64-bit ARM

From: Arnd Bergmann
Date: Mon Mar 22 2021 - 05:29:52 EST


On Mon, Mar 22, 2021 at 9:26 AM Krzysztof Kozlowski
<krzysztof.kozlowski@xxxxxxxxxxxxx> wrote:
> On 21/03/2021 22:09, Arnd Bergmann wrote:
>
> The SMC has two calling conventions - SMC32/HVC32 and SMC64/HVC64. The
> Stratix 10 driver uses the 64-bit calling convention (see
> INTEL_SIP_SMC_FAST_CALL_VAL in
> include/linux/firmware/intel/stratix10-smc.h), so it should not run in
> aarch32 (regardless of type of hardware).
>
> I think that my patch limiting the support to 64-bit makes sense.

I see that this is the only driver in the kernel that doesn't support the
32-bit calling conventions though, everything else either uses the the 32-bit
calling conventions unconditionally, or picks the ones matching the
kernel execution state.

If the firmware supports both, it would seem best to change the driver
to work like the other ones and pick the appropriate interface based
on what kernel it's running on.

If the firmware is fundamentally limited to the 64-bit interface, your
patch does seem correct, but I'd suggest explaining that in the
changelog.

Arnd