qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Fabien Chouteau <chouteau@adacore.com>,
	Thomas Huth <thuth@redhat.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	KONRAD Frederic <frederic.konrad@adacore.com>,
	Artyom Tarasenko <atar4qemu@gmail.com>
Subject: Re: [RFC PATCH 2/2] hw/sparc: Allow building without the leon3 machine
Date: Tue, 27 Apr 2021 17:07:50 -0700	[thread overview]
Message-ID: <6300f36d-077b-491f-5ef1-ed2126a2db7c@linaro.org> (raw)
In-Reply-To: <20210427192658.266933-3-f4bug@amsat.org>

On 4/27/21 12:26 PM, Philippe Mathieu-Daudé wrote:
> When building without the leon3 machine, we get this link failure:
> 
>    /usr/bin/ld: target_sparc_int32_helper.c.o: in function `leon3_irq_manager':
>    target/sparc/int32_helper.c:172: undefined reference to `leon3_irq_ack'
> 
> This is because the leon3_irq_ack() is declared in hw/sparc/leon3.c,
> which is only build when CONFIG_LEON3 is selected.
> 
> Fix by moving the leon3_cache_control_int() / leon3_irq_manager()
> (which are specific to the leon3 machine) to hw/sparc/leon3.c.
> Move the trace events along (but don't rename them).
> 
> leon3_irq_ack() is now locally used, declare it static to reduce
> its scope.
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
> RFC: The problem is we have hardware specific code in the
> architectural translation code. I wish there was a better
> alternative rather than moving this code to hw/sparc/.
> ---

This one seems dead obvious.  I think this code should have been in 
hw/sparc/leon3.c to begin with.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2021-04-28  0:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 19:26 [PATCH 0/2] hw/sparc: Kconfig fixes to build with/without the leon3 machine Philippe Mathieu-Daudé
2021-04-27 19:26 ` [PATCH 1/2] hw/sparc: Allow building the leon3 machine stand-alone Philippe Mathieu-Daudé
2021-04-28  0:11   ` Richard Henderson
2021-04-28  8:38     ` Mark Cave-Ayland
2021-04-27 19:26 ` [RFC PATCH 2/2] hw/sparc: Allow building without the leon3 machine Philippe Mathieu-Daudé
2021-04-28  0:07   ` Richard Henderson [this message]
2021-04-28  9:21   ` Fred Konrad
2021-04-28  8:40 ` [PATCH 0/2] hw/sparc: Kconfig fixes to build with/without " Mark Cave-Ayland
2021-04-28  9:05 ` Fred Konrad

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=6300f36d-077b-491f-5ef1-ed2126a2db7c@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=atar4qemu@gmail.com \
    --cc=chouteau@adacore.com \
    --cc=f4bug@amsat.org \
    --cc=frederic.konrad@adacore.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).