qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] hw/sparc: Allow building the leon3 machine stand-alone


From: Mark Cave-Ayland
Subject: Re: [PATCH 1/2] hw/sparc: Allow building the leon3 machine stand-alone
Date: Wed, 28 Apr 2021 09:38:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

On 28/04/2021 01:11, Richard Henderson wrote:

On 4/27/21 12:26 PM, Philippe Mathieu-Daudé wrote:
When building only the leon3 machine, we get this link failure:

   /usr/bin/ld: target_sparc_win_helper.c.o: in function `cpu_put_psr':
   target/sparc/win_helper.c:91: undefined reference to `cpu_check_irqs'

This is because cpu_check_irqs() is defined in hw/sparc/sun4m.c,
which is only built if the base sun4m machines are built (with
the CONFIG_SUN4M selector).

Fix by moving cpu_check_irqs() out of hw/sparc/sun4m.c and build
it unconditionally.

Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
---
  hw/sparc/irq.c       | 61 ++++++++++++++++++++++++++++++++++++++++++++
  hw/sparc/sun4m.c     | 32 -----------------------
  hw/sparc/meson.build |  1 +
  3 files changed, 62 insertions(+), 32 deletions(-)
  create mode 100644 hw/sparc/irq.c

I think this code should be in target/sparc/.  There doesn't seem to be any reference to anything outside CPUSPARCState.

I suspect that this is based upon the existing precedent set by SPARC64 where the IRQ routines are stored in hw/sparc64/sparc64.c. I'd lean towards the current approach for now so that both 32-bit and 64-bit could be moved into target/sparc as a separate exercise for consistency.


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]