[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH for-2.5?] hw/ppc/ppc405_boards: Fix infinite recur
From: |
David Gibson |
Subject: |
Re: [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 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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 <address@hidden>
> > ---
> > 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 <address@hidden>
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
signature.asc
Description: PGP signature