2019-05-19 20:07:45 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2017-10-31 02:33:30 +08:00
|
|
|
scmi-bus-y = bus.o
|
2020-07-01 23:53:40 +08:00
|
|
|
scmi-driver-y = driver.o notify.o
|
2021-08-03 21:10:18 +08:00
|
|
|
scmi-transport-$(CONFIG_ARM_SCMI_HAVE_SHMEM) = shmem.o
|
2021-08-03 21:10:17 +08:00
|
|
|
scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += mailbox.o
|
|
|
|
scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_SMC) += smc.o
|
2021-08-03 21:10:20 +08:00
|
|
|
scmi-transport-$(CONFIG_ARM_SCMI_HAVE_MSG) += msg.o
|
2021-08-03 21:10:24 +08:00
|
|
|
scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_VIRTIO) += virtio.o
|
2021-10-28 22:00:09 +08:00
|
|
|
scmi-transport-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += optee.o
|
2020-11-20 03:10:47 +08:00
|
|
|
scmi-protocols-y = base.o clock.o perf.o power.o reset.o sensors.o system.o voltage.o
|
2020-09-07 19:09:23 +08:00
|
|
|
scmi-module-objs := $(scmi-bus-y) $(scmi-driver-y) $(scmi-protocols-y) \
|
|
|
|
$(scmi-transport-y)
|
|
|
|
obj-$(CONFIG_ARM_SCMI_PROTOCOL) += scmi-module.o
|
2017-06-14 20:48:26 +08:00
|
|
|
obj-$(CONFIG_ARM_SCMI_POWER_DOMAIN) += scmi_pm_domain.o
|
2022-07-04 18:19:33 +08:00
|
|
|
obj-$(CONFIG_ARM_SCMI_POWER_CONTROL) += scmi_power_control.o
|
firmware: arm_scmi: Disable ftrace for Clang Thumb2 builds
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.
Link: https://lore.kernel.org/r/20220203082204.1176734-11-ardb@kernel.org
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2022-02-03 16:22:01 +08:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_THUMB2_KERNEL)$(CONFIG_CC_IS_CLANG),yy)
|
|
|
|
# The use of R7 in the SMCCC conflicts with the compiler's use of R7 as a frame
|
|
|
|
# pointer in Thumb2 mode, which is forcibly enabled by Clang when profiling
|
|
|
|
# hooks are inserted via the -pg switch.
|
|
|
|
CFLAGS_REMOVE_smc.o += $(CC_FLAGS_FTRACE)
|
|
|
|
endif
|