From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754654AbcDVRct (ORCPT ); Fri, 22 Apr 2016 13:32:49 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:14796 "EHLO imgpgp01.kl.imgtec.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754531AbcDVRcs (ORCPT ); Fri, 22 Apr 2016 13:32:48 -0400 X-PGP-Universal: processed; by imgpgp01.kl.imgtec.org on Fri, 22 Apr 2016 18:32:46 +0100 Date: Fri, 22 Apr 2016 18:32:45 +0100 From: James Hogan To: "Maciej W. Rozycki" CC: Paul Burton , , "Ralf Baechle" , , "stable # v4 . 4+" , Subject: Re: [PATCH] MIPS: Allow R6 compact branch policy to be left unspecified Message-ID: <20160422173245.GC2467@jhogan-linux.le.imgtec.org> References: <1461314611-15317-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UPT3ojh+0CqEDtpF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [192.168.154.110] X-ESG-ENCRYPT-TAG: 6e37d52 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --UPT3ojh+0CqEDtpF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 22, 2016 at 04:56:02PM +0100, Maciej W. Rozycki wrote: > On Fri, 22 Apr 2016, Paul Burton wrote: >=20 > > It turns out that some toolchains which support MIPS R6 don't support > > the -mcompact-branches flag to specify compact branch behaviour. Default > > to not providing the -mcompact-branch option to the compiler such that > > we can build with such toolchains. >=20 > Good idea overall, one further suggestion below. >=20 > > diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug > > index f0e314c..e91b3d1 100644 > > --- a/arch/mips/Kconfig.debug > > +++ b/arch/mips/Kconfig.debug > > @@ -117,7 +117,15 @@ if CPU_MIPSR6 > > =20 > > choice > > prompt "Compact branch policy" > > - default MIPS_COMPACT_BRANCHES_OPTIMAL > > + default MIPS_COMPACT_BRANCHES_DEFAULT > > + > > +config MIPS_COMPACT_BRANCHES_DEFAULT > > + bool "Toolchain Default (don't specify)" > > + help > > + Don't pass the -mcompact-branches flag to the compiler, allowing it > > + to use its default (generally "optimal"). This is particularly > > + useful for early R6-supporting toolchains which don't support the > > + -mcompact-branches flag. > > =20 > > config MIPS_COMPACT_BRANCHES_NEVER > > bool "Never (force delay slot branches)" >=20 > How about making the option depend on DEBUG_KERNEL and maybe making it a= n=20 > umbrella setting to hide details from users who do not want to be=20 > bothered, i.e. something like: >=20 > config MIPS_COMPACT_BRANCHES_OVERRIDE > bool "Override the toolchain default for compact branch policy" > depends on DEBUG_KERNEL > default n Although note that "default n" is redundant. Cheers James > [...] > if MIPS_COMPACT_BRANCHES_OVERRIDE > choice > prompt "Compact branch policy" > default MIPS_COMPACT_BRANCHES_OPTIMAL > [...] > endif # MIPS_COMPACT_BRANCHES_OVERRIDE >=20 > ? >=20 > Maciej >=20 --UPT3ojh+0CqEDtpF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXGmA9AAoJEGwLaZPeOHZ6/QYP/A0BLwpn4Ruxm7GGWdyP3qqT 6E7MA8AFnLkKVdm/b408fOovMlD1Iu7rvS+dkeeENg2z8Sqp2/wr2wDJJOlxjznj bJ7fr5Jhl7vFfwCRqAe9RfkeMCSWb0pnlmMahcUnthI0c+suAAczdkWS+KMOnJQ0 3NU/iZgCZeGqmu2yr5nrJ2cYE6pobx/7E8na63GHCtN54JYROjfjnU2NHQ/d6lOy r+PrFrPFVLuoQX96+EDYyj3dWDD4OMaQqGXTdoKJNtuvxNBmJN/P0pYpll4EorZg 7hRthYe9e9U5v2DsKYNkN546+C4Y2/vRaYkv+lGxBy909vB0lZ6AQW1eak5jTPsT krvpG9eN0jUWMB4zIe+BUjb1Iq9CWNORKMWJ36gpsXNT6WRGiKXQLSIVg2vZ4gjo 6AIho0rHp0w0FaH8Tqv6Cy5TSlSPtxNXqBnZ5Q5c5VhSmhbNNaqtqnsPcXELDy1Q Rib7zb+emNDJHR6tANDCtSLPCeUJO4HFM8/sLsnW/RAlWKVvfXB+02/oYjF0yzDB A/B3BY9tt8Y4n9xgW3CdN/Cz2QGzCLCB1K3tzfEzQNd5zfnXqsE68kSDjPGQUFlb /Owjc5W65isVpX5XPdxKZA7Ogio6HiD2LyBD5EUovtiIPkeK2tmZ0AeSKbQo1TSF sd6O5AmklGLus+ID52UZ =Mn5p -----END PGP SIGNATURE----- --UPT3ojh+0CqEDtpF--