From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50259 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754008AbdKFTFx (ORCPT ); Mon, 6 Nov 2017 14:05:53 -0500 Message-ID: <1509995136.2748.110.camel@decadent.org.uk> Subject: Re: [PATCH 3.16-stable 81/87] MIPS: DEC: Avoid la pseudo-instruction in delay slots From: Ben Hutchings To: Arnd Bergmann Cc: stable@vger.kernel.org, Ralf Baechle Date: Mon, 06 Nov 2017 19:05:36 +0000 In-Reply-To: <20170505194745.3627137-82-arnd@arndb.de> References: <20170505194745.3627137-1-arnd@arndb.de> <20170505194745.3627137-82-arnd@arndb.de> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-UodVZxHtVNNLkX19Lakb" Mime-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: --=-UodVZxHtVNNLkX19Lakb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-05-05 at 21:47 +0200, Arnd Bergmann wrote: > From: Ralf Baechle >=20 > Commit a4d7f14bd8d3316f847c3e0f7020dad95a8a648a upstream. >=20 > When expanding the la or dla pseudo-instruction in a delay slot the GNU > assembler will complain should the pseudo-instruction expand to multiple > actual instructions, since only the first of them will be in the delay > slot leading to the pseudo-instruction being only partially executed if > the branch is taken. Use of PTR_LA in the dec int-handler.S leads to > such warnings: >=20 > arch/mips/dec/int-handler.S: Assembler messages: > arch/mips/dec/int-handler.S:149: Warning: macro instruction expanded in= to multiple instructions in a branch delay slot > arch/mips/dec/int-handler.S:198: Warning: macro instruction expanded in= to multiple instructions in a branch delay slot >=20 > Avoid this by open coding the PTR_LA macros. This needed a follow-up fix: commit 68fe55680d0f3342969f49412fceabb90bdfadba Author: Maciej W. Rozycki Date: Sun Jul 30 21:28:15 2017 +0100 MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression which is missing from the 3.12, 3.18 and 4.4 branches. Ben. > Signed-off-by: Ralf Baechle > Signed-off-by: Arnd Bergmann > --- > arch/mips/dec/int-handler.S | 40 ++++++++++++++++++++++++++++++++++++++-= - > 1 file changed, 38 insertions(+), 2 deletions(-) >=20 > diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S > index 41a2fa1fa12e..c7953f2aca4f 100644 > --- a/arch/mips/dec/int-handler.S > +++ b/arch/mips/dec/int-handler.S > @@ -146,7 +146,25 @@ > /* > * Find irq with highest priority > */ > - PTR_LA t1,cpu_mask_nr_tbl > + # open coded PTR_LA t1, cpu_mask_nr_tbl > +#if (_MIPS_SZPTR =3D=3D 32) > + # open coded la t1, cpu_mask_nr_tbl > + lui t1, %hi(cpu_mask_nr_tbl) > + addiu t1, %lo(cpu_mask_nr_tbl) > + > +#endif > +#if (_MIPS_SZPTR =3D=3D 64) > + # open coded dla t1, cpu_mask_nr_tbl > + .set push > + .set noat > + lui t1, %highest(cpu_mask_nr_tbl) > + lui AT, %hi(cpu_mask_nr_tbl) > + daddiu t1, t1, %higher(cpu_mask_nr_tbl) > + daddiu AT, AT, %lo(cpu_mask_nr_tbl) > + dsll t1, 32 > + daddu t1, t1, AT > + .set pop > +#endif > 1: lw t2,(t1) > nop > and t2,t0 > @@ -195,7 +213,25 @@ > /* > * Find irq with highest priority > */ > - PTR_LA t1,asic_mask_nr_tbl > + # open coded PTR_LA t1,asic_mask_nr_tbl > +#if (_MIPS_SZPTR =3D=3D 32) > + # open coded la t1, asic_mask_nr_tbl > + lui t1, %hi(asic_mask_nr_tbl) > + addiu t1, %lo(asic_mask_nr_tbl) > + > +#endif > +#if (_MIPS_SZPTR =3D=3D 64) > + # open coded dla t1, asic_mask_nr_tbl > + .set push > + .set noat > + lui t1, %highest(asic_mask_nr_tbl) > + lui AT, %hi(asic_mask_nr_tbl) > + daddiu t1, t1, %higher(asic_mask_nr_tbl) > + daddiu AT, AT, %lo(asic_mask_nr_tbl) > + dsll t1, 32 > + daddu t1, t1, AT > + .set pop > +#endif > 2: lw t2,(t1) > nop > and t2,t0 --=20 Ben Hutchings It is a miracle that curiosity survives formal education. - Albert Einstein --=-UodVZxHtVNNLkX19Lakb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAloAsoAACgkQ57/I7JWG EQm8whAAlK60TdcctEEGo9sVD2eh9cc1tqqHfGLYciYCgBkFNBqPQutwnerbgFzw zRG3bH9EU9isEXUyzxiQlfBINRsN+uCprNcCohinet4e3v7iggsLSeqwil0XaOU7 dobhtMVqBLtxFnVxD/uwm4nncPmHSJAbdRmXIHb9NRmjrPptuoGqLbxH+OL9sY9e rw0ivdGT1KCAjbudw7roCUUH+OpeFKPCGvb0YN430FmhuISS8Z1flWMZrtA5FiG+ Yr9vbE2t+mTXUCuDtOE5ph/UhVvtC3+BLLElEhZjtKCbvELPkppNVRR1yQRkWfsX KM1d/lcfg25w9p6Q65APw1fHjRlQ8E1Go05SsYg10sbnK2ZXr2UkxSvBIdeMkbJr z/QG646jJNVTMvhJAm4fN/crh+ZbEJ3yhKxJkyS0dao09RoXRaksjvt0PTR0Mop3 R+yjY5B0gsd/EVrqTWlLuO11BZHyMYe67FkGZ8JPKbkU0WIBAbxbqkHq1d5s3PTV BTaUK3TVy7pmg5sAONH6uZj4EQzjAwpgBBpncW5GFWC7mK+ZzTqBPqLWqgG+pJvb a9XwIWrw2Y2ll3TBIwWy03tdtNo2wmSdID1wqM3ghQMzvEdkSqP9au5B/RX6v+3h ErzGNt76B+/mazoY3d9SoWa6Mpt4p8zdwyKDzySxtB1TIpguUBg= =U7ca -----END PGP SIGNATURE----- --=-UodVZxHtVNNLkX19Lakb--