* [PATCH] loongarch64: move memory map to boot.c
@ 2024-05-07 14:51 Paolo Bonzini
2024-05-07 16:22 ` Richard Henderson
2024-05-08 21:15 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2024-05-07 14:51 UTC (permalink / raw)
To: qemu-devel
Ensure that it can be used even if virt.c is not included in the build, as
is the case for --without-default-devices.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/hw/loongarch/boot.h | 10 ++++++++++
include/hw/loongarch/virt.h | 10 ----------
hw/loongarch/boot.c | 3 +++
hw/loongarch/virt.c | 3 ---
.gitlab-ci.d/buildtest.yml | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boot.h
index 4ebcc89dcf2..b3b870df1f0 100644
--- a/include/hw/loongarch/boot.h
+++ b/include/hw/loongarch/boot.h
@@ -104,6 +104,16 @@ struct loongarch_boot_info {
uint64_t a0, a1, a2;
};
+extern struct memmap_entry *memmap_table;
+extern unsigned memmap_entries;
+
+struct memmap_entry {
+ uint64_t address;
+ uint64_t length;
+ uint32_t type;
+ uint32_t reserved;
+};
+
void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *info);
#endif /* HW_LOONGARCH_BOOT_H */
diff --git a/include/hw/loongarch/virt.h b/include/hw/loongarch/virt.h
index 4e14bf6060d..fdbd2b146f1 100644
--- a/include/hw/loongarch/virt.h
+++ b/include/hw/loongarch/virt.h
@@ -37,16 +37,6 @@
#define FDT_BASE 0x100000
-extern struct memmap_entry *memmap_table;
-extern unsigned memmap_entries;
-
-struct memmap_entry {
- uint64_t address;
- uint64_t length;
- uint32_t type;
- uint32_t reserved;
-};
-
struct LoongArchMachineState {
/*< private >*/
MachineState parent_obj;
diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c
index 7d1630b2e74..03f6301a773 100644
--- a/hw/loongarch/boot.c
+++ b/hw/loongarch/boot.c
@@ -15,6 +15,9 @@
#include "sysemu/reset.h"
#include "sysemu/qtest.h"
+struct memmap_entry *memmap_table;
+unsigned memmap_entries;
+
ram_addr_t initrd_offset;
uint64_t initrd_size;
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index c0999878df6..504e1fb349d 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -516,9 +516,6 @@ static void virt_powerdown_req(Notifier *notifier, void *opaque)
acpi_send_event(s->acpi_ged, ACPI_POWER_DOWN_STATUS);
}
-struct memmap_entry *memmap_table;
-unsigned memmap_entries;
-
static void memmap_add_entry(uint64_t address, uint64_t length, uint32_t type)
{
/* Ensure there are no duplicate entries. */
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index e9402a68a79..bab61945643 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -650,7 +650,7 @@ build-tci:
# Check our reduced build configurations
# requires libfdt: aarch64, arm, i386, loongarch64, microblaze, microblazeel,
# mips64el, or1k, ppc, ppc64, riscv32, riscv64, rx, x86_64
-# does not build without boards: i386, loongarch64, s390x, sh4, sh4eb, x86_64
+# does not build without boards: i386, s390x, sh4, sh4eb, x86_64
build-without-defaults:
extends: .native_build_job_template
needs:
--
2.45.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] loongarch64: move memory map to boot.c
2024-05-07 14:51 [PATCH] loongarch64: move memory map to boot.c Paolo Bonzini
@ 2024-05-07 16:22 ` Richard Henderson
2024-05-08 21:15 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2024-05-07 16:22 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 5/7/24 07:51, Paolo Bonzini wrote:
> Ensure that it can be used even if virt.c is not included in the build, as
> is the case for --without-default-devices.
>
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
> include/hw/loongarch/boot.h | 10 ++++++++++
> include/hw/loongarch/virt.h | 10 ----------
> hw/loongarch/boot.c | 3 +++
> hw/loongarch/virt.c | 3 ---
> .gitlab-ci.d/buildtest.yml | 2 +-
> 5 files changed, 14 insertions(+), 14 deletions(-)
Acked-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] loongarch64: move memory map to boot.c
2024-05-07 14:51 [PATCH] loongarch64: move memory map to boot.c Paolo Bonzini
2024-05-07 16:22 ` Richard Henderson
@ 2024-05-08 21:15 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-08 21:15 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 7/5/24 16:51, Paolo Bonzini wrote:
> Ensure that it can be used even if virt.c is not included in the build, as
> is the case for --without-default-devices.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> include/hw/loongarch/boot.h | 10 ++++++++++
> include/hw/loongarch/virt.h | 10 ----------
> hw/loongarch/boot.c | 3 +++
> hw/loongarch/virt.c | 3 ---
> .gitlab-ci.d/buildtest.yml | 2 +-
> 5 files changed, 14 insertions(+), 14 deletions(-)
Thanks, patch queued to hw-misc tree.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-08 21:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 14:51 [PATCH] loongarch64: move memory map to boot.c Paolo Bonzini
2024-05-07 16:22 ` Richard Henderson
2024-05-08 21:15 ` Philippe Mathieu-Daudé
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).