From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: [PATCH] firmware: qcom-scm: build for correct architecture level Date: Mon, 12 Oct 2015 16:56:19 +0200 Message-ID: <8346311.PtPZJEII3N@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from mout.kundenserver.de ([212.227.126.187]:55776 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbbJLO44 (ORCPT ); Mon, 12 Oct 2015 10:56:56 -0400 Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: linux-arm-msm@vger.kernel.org Cc: Bjorn Andersson , Andy Gross , Russell King , Kumar Gala , linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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. Signed-off-by: Arnd Bergmann diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile index 2ee83474a3c1..f0066373b170 100644 --- a/drivers/firmware/Makefile +++ b/drivers/firmware/Makefile @@ -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/