[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] hw/arm/armv7m: Remove unused armv7m_init()
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] hw/arm/armv7m: Remove unused armv7m_init() function |
Date: |
Wed, 13 Jun 2018 15:39:19 +0100 |
User-agent: |
Mutt/1.9.5 (2018-04-13) |
On Fri, Jun 01, 2018 at 03:43:28PM +0100, Peter Maydell wrote:
> Remove the now-unused armv7m_init() function. This was a legacy from
> before we properly QOMified ARMv7M, and it has some flaws:
>
> * it combines work that needs to be done by an SoC object (creating
> and initializing the TYPE_ARMV7M object) with work that needs to
> be done by the board model (setting the system up to load the ELF
> file specified with -kernel)
> * TYPE_ARMV7M creation failure is fatal, but an SoC object wants to
> arrange to propagate the failure outward
> * it uses allocate-and-create via qdev_create() whereas the current
> preferred style for SoC objects is to do creation in-place
>
> Board and SoC models can instead do the two jobs this function
> was doing themselves, in the right places and with whatever their
> preferred style/error handling is.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> include/hw/arm/arm.h | 8 ++------
> hw/arm/armv7m.c | 21 ---------------------
> 2 files changed, 2 insertions(+), 27 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature