From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:57154 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752093AbbFNXOH (ORCPT ); Sun, 14 Jun 2015 19:14:07 -0400 Message-ID: <1434323634.9977.20.camel@decadent.org.uk> Subject: Re: [PATCH stable/4.0.y] ARM: 8325/1: exynos: move resume code to .text section From: Ben Hutchings To: Kevin Hilman Cc: stable@vger.kernel.org, Nicolas Pitre , Ard Biesheuvel , Russell King , Kevin Hilman Date: Mon, 15 Jun 2015 00:13:54 +0100 In-Reply-To: <1433299379-18183-1-git-send-email-khilman@kernel.org> References: <1433299379-18183-1-git-send-email-khilman@kernel.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-FYfzD9zpPGbpr73eRx2a" Mime-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: --=-FYfzD9zpPGbpr73eRx2a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-06-02 at 19:42 -0700, Kevin Hilman wrote: > From: Ard Biesheuvel >=20 > This code calls cpu_resume() using a straight branch (b), so > now that we have moved cpu_resume() back to .text, this should > be moved there as well. Any direct references to symbols that will > remain in the .data section are replaced with explicit PC-relative > references. I don't get it. cpu_resume() is still in the .data section in 4.0. This appears to depend on: commit d0776aff9a38b1390cc06ffc2c4dcf6ece7c05b9 Author: Ard Biesheuvel Date: Wed Mar 25 07:39:21 2015 +0100 ARM: 8324/1: move cpu_resume() to .text section Ben. > Acked-by: Nicolas Pitre > Signed-off-by: Ard Biesheuvel > Signed-off-by: Russell King > (cherry picked from commit 12833bacf5d904c2dac0c3f52b2ebde5f2c5a2bc) > Cc: # v4.0+ > Signed-off-by: Kevin Hilman > --- > This fixes compile errors on stable/linux-4.0.y when building for ARM > using multi_v7_defconfig + CONFIG_THUMB2_KERNEL=3Dy: >=20 > ../arch/arm/mach-exynos/sleep.S:72: Error: invalid immediate for address = calculation (value =3D 0x00000004) > ../arch/arm/mach-exynos/sleep.S:74: Error: invalid immediate for address = calculation (value =3D 0x00000004) > =20 > arch/arm/mach-exynos/sleep.S | 31 ++++++++++++++++--------------- > 1 file changed, 16 insertions(+), 15 deletions(-) >=20 > diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S > index 31d25834b9c4..cf950790fbdc 100644 > --- a/arch/arm/mach-exynos/sleep.S > +++ b/arch/arm/mach-exynos/sleep.S > @@ -23,14 +23,7 @@ > #define CPU_MASK 0xff0ffff0 > #define CPU_CORTEX_A9 0x410fc090 > =20 > - /* > - * The following code is located into the .data section. This is to > - * allow l2x0_regs_phys to be accessed with a relative load while we > - * can't rely on any MMU translation. We could have put l2x0_regs_phys > - * in the .text section as well, but some setups might insist on it to > - * be truly read-only. (Reference from: arch/arm/kernel/sleep.S) > - */ > - .data > + .text > .align > =20 > /* > @@ -69,10 +62,12 @@ ENTRY(exynos_cpu_resume_ns) > cmp r0, r1 > bne skip_cp15 > =20 > - adr r0, cp15_save_power > + adr r0, _cp15_save_power > ldr r1, [r0] > - adr r0, cp15_save_diag > + ldr r1, [r0, r1] > + adr r0, _cp15_save_diag > ldr r2, [r0] > + ldr r2, [r0, r2] > mov r0, #SMC_CMD_C15RESUME > dsb > smc #0 > @@ -118,14 +113,20 @@ skip_l2x0: > skip_cp15: > b cpu_resume > ENDPROC(exynos_cpu_resume_ns) > + > + .align > +_cp15_save_power: > + .long cp15_save_power - . > +_cp15_save_diag: > + .long cp15_save_diag - . > +#ifdef CONFIG_CACHE_L2X0 > +1: .long l2x0_saved_regs - . > +#endif /* CONFIG_CACHE_L2X0 */ > + > + .data > .globl cp15_save_diag > cp15_save_diag: > .long 0 @ cp15 diagnostic > .globl cp15_save_power > cp15_save_power: > .long 0 @ cp15 power control > - > -#ifdef CONFIG_CACHE_L2X0 > - .align > -1: .long l2x0_saved_regs - . > -#endif /* CONFIG_CACHE_L2X0 */ --=20 Ben Hutchings Never put off till tomorrow what you can avoid all together. --=-FYfzD9zpPGbpr73eRx2a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIVAwUAVX4Kt+e/yOyVhhEJAQqHBg/+J7pFje7s0TY6nZlAwvJyRskmQdpBjcAk 4sPmyuPdrIpfPJiupu0WCpY0/NCvtQt3VS55OzJy+4/atfpnYNrQZbe/UHYM3E8v fb4lSTY4cxJza2h/fNanmQAVujHsixeuliv1nYRpNNxuiDkKE8Txtw4h3qMAn3E8 o0BjSPPzBuOAc/KRYdcjJeS01U8/FzdVIMVXobl3AY0N0z1QaRdKg9rdWabheBep hoeYcw/W3/MGicT7TXJoSx6BsYuQlo5FxKbm0mw1nJ8W+gL3wPm8w2FmER6PRSNV vzkRJmJ2GaxjiN3ESD8msxIil9bdqVN2Rk0rO6DSzCZelWPnUzYcspmqTph11ysC TPmErk+F04vj8OSaG/kD+LPIndxZc+B6L4mpTbzvd38ibhBF3q+hw77i/pRNlQOt 1LwPo5dsKMSe0oZAvqFeQk4EP3FBnrvrjuq4odaCboAtKTiFQtM+gkHEBAAHkm8w HrVWxQYDFC6s5N8ZtYmC4xcgvQyEHuCB9n+Rgf/SyaN16SlHomTi0RL2VS+phJJi 7wJ26Uw+iNsbmXSeniA6nKkaIS4qY4UbcvrSMYxxfGCqtVbMSfeopwKfp89iDt/F GeE4thStnwK+VXVBfI8BLC+6mIombGT1zFGlH6LfcplldgX7+T3qQF2NDUOA6lT9 Fn/GIiT4FiQ= =7T6l -----END PGP SIGNATURE----- --=-FYfzD9zpPGbpr73eRx2a--