[PATCH v3 10/13] drivers/firmware/scmi: disable ftrace for Clang Thumb2 builds

Ard Biesheuvel ardb at kernel.org
Tue Feb 8 13:18:01 PST 2022


On Mon, 7 Feb 2022 at 19:29, Sudeep Holla <sudeep.holla at arm.com> wrote:
>
> On Thu, Feb 03, 2022 at 09:22:01AM +0100, Ard Biesheuvel wrote:
> > The SMC calling convention designates R0-R7 as input registers in
> > AArch32 mode, and this conflicts with the compiler's use of R7 as a
> > frame pointer when building in Thumb2 mode. Generally, we don't enable
> > the frame pointer, and GCC happily enables the -pg profiling hooks
> > without them. However, Clang refuses, and errors out with the message
> > below:
> >
> > drivers/firmware/arm_scmi/smc.c:152:2: error: write to reserved register 'R7'
> >         arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res);
> >         ^
> > include/linux/arm-smccc.h:550:4: note: expanded from macro 'arm_smccc_1_1_invoke'
> >                         arm_smccc_1_1_smc(__VA_ARGS__);                 \
> >                         ^
> > Let's just disable ftrace for the compilation unit when building this
> > configuration.
> >
> > Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
> > Reviewed-by: Nick Desaulniers <ndesaulniers at google.com>
> > Acked-by: Sudeep Holla <sudeep.holla at arm.com>
>
> I know I already acked, but wanted to check if you want to take this as series
> or you want me to apply this one myself. I don't see any dependency on other
> patches but thought I will check with you and your plans.
>
> I am happy to take this patch alone if you prefer that. Let me know.
>

Yes, please.



More information about the linux-arm-kernel mailing list