hw/loongarch: Build fw_cfg.c as common object
cover hw/loongarch: Build fw_cfg.c as common object
LoongArch fw_cfg.c doesn't use target specific declarations, build it as common object.
Philippe Mathieu-Daudé (2):
hw/loongarch/virt: Remove unnecessary 'cpu.h' inclusion hw/loongarch/fw_cfg: Build in common_ss[]
include/hw/loongarch/virt.h | 1 - hw/loongarch/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.45.2
PATCH 1/2 hw/loongarch/virt: Remove unnecessary 'cpu.h' inclusion
--- include/hw/loongarch/virt.h | 1 - 1 file changed, 1 deletion(-)
include/hw/loongarch/virt.h +0 -1
@@ -8,7 +8,6 @@#ifndef HW_LOONGARCH_H #define HW_LOONGARCH_H -#include "target/loongarch/cpu.h" #include "hw/boards.h" #include "qemu/queue.h" #include "hw/block/flash.h"
Signature · 1 line
2.45.2
Re: [PATCH 1/2] hw/loongarch/virt: Remove unnecessary 'cpu.h' inclusion
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/loongarch/virt.h | 1 - 1 file changed, 1 deletion(-)include/hw/loongarch/virt.h +0
-0
include/hw/loongarch/virt.h line 13
Quoted 7 lines
include/hw/loongarch/virt.h +0
-1@@ -8,7 +8,6 @@#ifndef HW_LOONGARCH_H #define HW_LOONGARCH_H -#include "target/loongarch/cpu.h" #include "hw/boards.h" #include "qemu/queue.h" #include "hw/block/flash.h"
PATCH 2/2 hw/loongarch/fw_cfg: Build in common_ss[]
In reply to Philippe Mathieu-DaudéNothing in LoongArch fw_cfg.c requires target specific definitions.
--- hw/loongarch/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/loongarch/meson.build +1 -1
@@ -1,8 +1,8 @@ loongarch_ss = ss.source_set() loongarch_ss.add(files( - 'fw_cfg.c', 'boot.c', )) +common_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('fw_cfg.c')) loongarch_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('virt.c')) loongarch_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-build.c'))
Signature · 1 line
2.45.2
Re: [PATCH 2/2] hw/loongarch/fw_cfg: Build in common_ss[]
Quoted 12 lines · Philippe Mathieu-Daudé
Nothing in LoongArch
fw_cfg.crequires target specific definitions.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/loongarch/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/loongarch/meson.build +0
-0
hw/loongarch/meson.build line 8
Quoted 9 lines
hw/loongarch/meson.build +1
-1@@ -1,8 +1,8 @@ loongarch_ss = ss.source_set() loongarch_ss.add(files( - 'fw_cfg.c', 'boot.c', )) +common_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('fw_cfg.c')) loongarch_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('virt.c')) loongarch_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-build.c'))
Quoted 11 lines · Philippe Mathieu-Daudé
LoongArch
fw_cfg.cdoesn't use target specific declarations, build it as common object.Philippe Mathieu-Daudé (2):
hw/loongarch/virt: Remove unnecessary 'cpu.h' inclusion hw/loongarch/fw_cfg: Build in common_ss[]include/hw/loongarch/virt.h | 1 - hw/loongarch/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
Applied to loongarch-next.
Thanks.
Song Gao