Skip to content

Commit 3100423

Browse files
a3fShawn Guo
authored andcommitted
ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
512a928 ("ARM: imx: build v7_cpu_resume() unconditionally") introduced an unintended linker error for i.MX6 configurations that have ARM_CPU_SUSPEND=n which can happen if neither CONFIG_PM, CONFIG_CPU_IDLE, nor ARM_PSCI_FW are selected. Fix this by having v7_cpu_resume() compiled only when cpu_resume() it calls is available as well. The C declaration for the function remains unguarded to avoid future code inadvertently using a stub and introducing a regression to the bug the original commit fixed. Cc: <[email protected]> Fixes: 512a928 ("ARM: imx: build v7_cpu_resume() unconditionally") Reported-by: Clemens Gruber <[email protected]> Signed-off-by: Ahmad Fatoum <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent cbe63a8 commit 3100423

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm/mach-imx/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
9191
obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
9292
obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
9393
endif
94+
ifeq ($(CONFIG_ARM_CPU_SUSPEND),y)
9495
AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a
9596
obj-$(CONFIG_SOC_IMX6) += resume-imx6.o
97+
endif
9698
obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
9799

98100
obj-$(CONFIG_SOC_IMX1) += mach-imx1.o

0 commit comments

Comments
 (0)