From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3EUa-0001Uz-9h for qemu-devel@nongnu.org; Sun, 29 Nov 2015 21:47:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3EUZ-00025q-3N for qemu-devel@nongnu.org; Sun, 29 Nov 2015 21:47:04 -0500 Date: Mon, 30 Nov 2015 13:30:02 +1100 From: David Gibson Message-ID: <20151130023002.GB24766@voom.redhat.com> References: <1447685870-4395-1-git-send-email-peter.maydell@linaro.org> <564AF6C8.3010100@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CUfgB8w4ZwR/yMy5" Content-Disposition: inline In-Reply-To: <564AF6C8.3010100@redhat.com> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.5?] hw/ppc/ppc405_boards: Fix infinite recursion by converting taihu_cpld from old_mmio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org --CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 17, 2015 at 10:43:36AM +0100, Paolo Bonzini wrote: >=20 >=20 > On 16/11/2015 15:57, Peter Maydell wrote: > > The taihu_cpld_writel() function had an obvious typo that meant that > > if it was ever called it would go into an infinite recursion. Newer > > versions of clang will detect and warn about this: > > hw/ppc/ppc405_boards.c:481:1: warning: all paths through this functio= n will call itself [-Winfinite-recursion] > >=20 > > Fix this by converting taihu_cpld from the legacy old_mmio accessors > > to new-style ones, with an impl {} declaration to cause the core > > memory code to do the splitting of 16 bit and 32 bit accesses into > > multiple 8-bit accesses. > >=20 > > Signed-off-by: Peter Maydell > > --- > > Marked 'for-2.5?' because of the infinite recursion (though the bug > > has been present since the board support was first committed in 2007). > > NB that I don't have a Taihu image that would exercise the device. > > There would obviously be a smaller fix that just dealt with the recursi= on > > problem, but old_mmio is an obsolete interface we should be switching > > away from anyhow. >=20 > Yes, it makes sense and the diffstat is nice too. :) >=20 > Reviewed-by: Paolo Bonzini Applied to my for-2.5 tree. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --CUfgB8w4ZwR/yMy5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWW7SqAAoJEGw4ysog2bOSD2EQAIIasbXwfIomvAK5+/rB+t7j 4J4UWakes+13985xLCQJUXc5FH2Pn4Xmcq3hKfzmHzNB5C4ZG1P6aAzBU6bTD7YE 922j0Eh/BWgEEKdyj3pn566D7Z3teb5s6kPPPZ8tR609LrHIfcR47HMp1H62F92Y tzElrRq1TSKJUzuPm0e6XUMtcXmXnYfjWqYzZXCS8LW/r5yxjQNkvbcyBXIpjlUZ 3h+8BrWJbsEzopE/Mn0bb6WlmDrPGYptv8NI7U35zIbaL0fXMOGTQVx7NAXHSoTg IlBDTBUGWY2KTaOqMFddYR2I43My5MF7PVa7Mb3R7YG3VHPS1lQ0HcNnnwi6Nx2g LHtwEmYH9s0OetDV8+jAl6piWRpzT5Lmw0+zPA8mxLXpEpUNV7WzUyict0xzyb8u ut/YRrS0FgHC1Nnym0IgHElQ3NbScvRwf1GMNiUumAy5gavScgtDsuihqY2lVwsX aJhMl45gXfP9jG1NhzgKui5vuW8qaCpvV5VQA+JxK5eQ8ljdqxT2zXSxol56fW3F uV1nWIJdosA0bV9IaPkHSjmNSC+e3NJf++E2E08D5KmGiscyBWeHH3cMEFYwDp1c NiZwg0iJ+TQ5OdpGpMpbveAj8KcjTgr8arUd2Nr2qtYzsYRumzOFvCuV3+CCLj8o z348cxWAeMv20s5CzfQ9 =R1Tp -----END PGP SIGNATURE----- --CUfgB8w4ZwR/yMy5--