firmware: qcom-scm: build for correct architecture level
PATCH 1/1 firmware: qcom-scm: build for correct architecture level
The ".arch_extension sec" directive is only available on ARMv6 or higher, so if we enable the SCM driver while building a kernel for an older CPU, we get a build error:
/tmp/ccUyhMOY.s:130: Error: selected processor does not support ARM mode smc #0' /tmp/ccUyhMOY.s:216: Error: selected processor does not support ARM mode smc #0' /tmp/ccUyhMOY.s:373: Error: selected processor does not support ARM mode `smc #0' make[4]: *** [drivers/firmware/qcom_scm-32.o] Error 1
This changes the Makefile so we pass the ARMv7 architecture level both for the check and for the actual compilation of the scm driver.
drivers/firmware/Makefile +1 -1
@@ -15,7 +15,7 @@ obj-$(CONFIG_FIRMWARE_MEMMAP) += memmap.o obj-$(CONFIG_QCOM_SCM) += qcom_scm.o obj-$(CONFIG_QCOM_SCM_64) += qcom_scm-64.o obj-$(CONFIG_QCOM_SCM_32) += qcom_scm-32.o -CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1) +CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch armv7-a\n.arch_extension sec,-DREQUIRES_SEC=1) -march=armv7-a obj-y += broadcom/ obj-$(CONFIG_GOOGLE_FIRMWARE) += google/
PATCH 1/1 firmware: qcom-scm: build for correct architecture level
Quoted 9 lines · Arnd Bergmann
The ".arch_extension sec" directive is only available on ARMv6 or higher, so if we enable the SCM driver while building a kernel for an older CPU, we get a build error:
/tmp/ccUyhMOY.s:130: Error: selected processor does not support ARM modesmc #0' /tmp/ccUyhMOY.s:216: Error: selected processor does not support ARM modesmc #0'/tmp/ccUyhMOY.s:373: Error: selected processor does not support ARM mode `smc #0' make[4]: *** [drivers/firmware/qcom_scm-32.o] Error 1
Quoted 5 lines
This changes the
Makefileso we pass the ARMv7 architecture level both for the check and for the actual compilation of the scm driver.Signed-off-by Arnd Bergmann <[email protected]>
Thanks for fixing this. I'll pull it in.
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project