From c356bdb407baf23b202a6b4d2234114db6ae55bd Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Wed, 26 Feb 2014 19:48:33 +0800 Subject: ARM: imx6: move v7_cpu_resume() into suspend-imx6.S The suspend-imx6.S is introduced recently for suspend low-level assembly code. Since function v7_cpu_resume() is only used by suspend support, it makes sense to move the function into suspend-imx6.S, and control the build of the file with CONFIG_SUSPEND option. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/headsmp.S | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'arch/arm/mach-imx/headsmp.S') diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S index 627f16f0e9d1..e4b9fed8144d 100644 --- a/arch/arm/mach-imx/headsmp.S +++ b/arch/arm/mach-imx/headsmp.S @@ -12,8 +12,6 @@ #include #include -#include -#include .section ".text.head", "ax" @@ -35,37 +33,3 @@ ENTRY(v7_secondary_startup) b secondary_startup ENDPROC(v7_secondary_startup) #endif - -#ifdef CONFIG_ARM_CPU_SUSPEND -/* - * The following code must assume it is running from physical address - * where absolute virtual addresses to the data section have to be - * turned into relative ones. - */ - -#ifdef CONFIG_CACHE_L2X0 - .macro pl310_resume - adr r0, l2x0_saved_regs_offset - ldr r2, [r0] - add r2, r2, r0 - ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0 - ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value - str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl - mov r1, #0x1 - str r1, [r0, #L2X0_CTRL] @ re-enable L2 - .endm - -l2x0_saved_regs_offset: - .word l2x0_saved_regs - . - -#else - .macro pl310_resume - .endm -#endif - -ENTRY(v7_cpu_resume) - bl v7_invalidate_l1 - pl310_resume - b cpu_resume -ENDPROC(v7_cpu_resume) -#endif -- cgit v1.2.3 From facadba6a12813d8bbc5586261d873fa5f3dd4fa Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Wed, 26 Feb 2014 19:57:56 +0800 Subject: ARM: imx6: build headsmp.o only on CONFIG_SMP With v7_cpu_resume() being moved out of headsmp.S, all the remaining code in the file is only needed by CONFIG_SMP build. So we can control the build of headsmp.o with only obj-$(CONFIG_SMP) now. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/Makefile | 4 ++-- arch/arm/mach-imx/headsmp.S | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-imx/headsmp.S') diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index b4c19cda67e8..9c776a03bb40 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -104,9 +104,9 @@ obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a obj-$(CONFIG_SUSPEND) += suspend-imx6.o -obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o +obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o # i.MX6SL reuses i.MX6Q code -obj-$(CONFIG_SOC_IMX6SL) += pm-imx6q.o headsmp.o +obj-$(CONFIG_SOC_IMX6SL) += pm-imx6q.o # i.MX5 based machines obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S index e4b9fed8144d..6e1a56dafe35 100644 --- a/arch/arm/mach-imx/headsmp.S +++ b/arch/arm/mach-imx/headsmp.S @@ -15,7 +15,6 @@ .section ".text.head", "ax" -#ifdef CONFIG_SMP diag_reg_offset: .word g_diag_reg - . @@ -32,4 +31,3 @@ ENTRY(v7_secondary_startup) set_diag_reg b secondary_startup ENDPROC(v7_secondary_startup) -#endif -- cgit v1.2.3 From c8ae7e9bfc8caf679e891c4f0a04f2435b45e2da Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Thu, 27 Feb 2014 16:30:24 +0800 Subject: ARM: imx6: drop .text.head section annotation from headsmp.S The function v7_secondary_startup() works just fine in .text section, so there is no need to have .text.head section annotation at all. Drop it. Suggested-by: Russell King Signed-off-by: Shawn Guo --- arch/arm/mach-imx/headsmp.S | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/arm/mach-imx/headsmp.S') diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S index 6e1a56dafe35..de5047c8a6c8 100644 --- a/arch/arm/mach-imx/headsmp.S +++ b/arch/arm/mach-imx/headsmp.S @@ -13,8 +13,6 @@ #include #include - .section ".text.head", "ax" - diag_reg_offset: .word g_diag_reg - . -- cgit v1.2.3