From: David Gibson <david@gibson.dropbear.id.au>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.5?] hw/ppc/ppc405_boards: Fix infinite recursion by converting taihu_cpld from old_mmio
Date: Mon, 30 Nov 2015 13:30:02 +1100 [thread overview]
Message-ID: <20151130023002.GB24766@voom.redhat.com> (raw)
In-Reply-To: <564AF6C8.3010100@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]
On Tue, Nov 17, 2015 at 10:43:36AM +0100, Paolo Bonzini wrote:
>
>
> 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 function will call itself [-Winfinite-recursion]
> >
> > 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.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > 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 recursion
> > problem, but old_mmio is an obsolete interface we should be switching
> > away from anyhow.
>
> Yes, it makes sense and the diffstat is nice too. :)
>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Applied to my for-2.5 tree.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-11-30 2:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 14:57 [Qemu-devel] [PATCH for-2.5?] hw/ppc/ppc405_boards: Fix infinite recursion by converting taihu_cpld from old_mmio Peter Maydell
2015-11-17 9:43 ` Paolo Bonzini
2015-11-30 2:30 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151130023002.GB24766@voom.redhat.com \
--to=david@gibson.dropbear.id.au \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).