hw/riscv: Post-review cleanups
Subsystems (2)
cover hw/riscv: Post-review cleanups
Phil made a bunch of suggestions during the Atlantis review for things to clean up afterwards. Here are those cleanups. The patches are otherwise unrelated.
Joel Stanley (4):
hw/riscv/boot: Make RISCVBootInfo const where possible hw/riscv/virt: Use hwaddr for IMSIC device tree address tests/functional: Avoid unnecessary removal of scratch files hw/riscv/atlantis: Document QEMU-only I2C device tree nodes
include/hw/riscv/boot.h | 6 +++--- hw/riscv/boot.c | 6 +++--- hw/riscv/tt_atlantis.c | 1 + hw/riscv/virt.c | 5 +++-- tests/functional/arm/test_bpim2u.py | 11 ----------- tests/functional/arm/test_orangepi.py | 9 --------- tests/functional/riscv64/test_sifive_u.py | 4 ---- 7 files changed, 10 insertions(+), 32 deletions(-)
Signature · 1 line
2.47.3
PATCH 1/4 hw/riscv/boot: Make RISCVBootInfo const where possible
As with riscv_load_firmware, take a const pointer in functions that reads the structure without writing.
--- include/hw/riscv/boot.h | 6 +++--- hw/riscv/boot.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
include/hw/riscv/boot.h +3 -3
@@ -50,10 +50,10 @@ void riscv_boot_info_init(RISCVBootInfo *info, RISCVHartArrayState *harts);void riscv_boot_info_init_discontig_mem (RISCVBootInfo *info,RISCVHartArrayState *harts,hwaddr low_start,hwaddr low_size); -vaddr riscv_calc_kernel_start_addr (RISCVBootInfo *info, +vaddr riscv_calc_kernel_start_addr (const RISCVBootInfo *info,hwaddr firmware_end_addr);hwaddr riscv_find_and_load_firmware (MachineState *machine, -RISCVBootInfo *info, +const RISCVBootInfo *info,const char *default_machine_firmware,hwaddr *firmware_load_addr,symbol_fn_t sym_cb);
@@ -71,7 +71,7 @@ void riscv_load_kernel(MachineState *machine,bool load_initrd, symbol_fn_t sym_cb);uint64_t riscv_compute_fdt_addr (hwaddr dram_base,hwaddr dram_size, -MachineState *ms,RISCVBootInfo *info); +MachineState *ms,const RISCVBootInfo *info);void riscv_load_fdt (hwaddr fdt_addr,void *fdt); void riscv_setup_rom_reset_vec(MachineState *machine, RISCVHartArrayState *harts, hwaddr saddr,
hw/riscv/boot.c +3 -3
@@ -91,7 +91,7 @@ void riscv_boot_info_init_discontig_mem(RISCVBootInfo *info, info->ram_low_size = low_size; } -vaddr riscv_calc_kernel_start_addr (RISCVBootInfo *info, +vaddr riscv_calc_kernel_start_addr (const RISCVBootInfo *info,hwaddr firmware_end_addr) {if (info->is_32bit) {return QEMU_ALIGN_UP (firmware_end_addr,4 * MiB);
@@ -151,7 +151,7 @@ char *riscv_find_firmware(const char *firmware_filename, }hwaddr riscv_find_and_load_firmware (MachineState *machine, -RISCVBootInfo *info, +const RISCVBootInfo *info,const char *default_machine_firmware,hwaddr *firmware_load_addr,symbol_fn_t sym_cb)
@@ -348,7 +348,7 @@ out:* The FDT is fdt_packed() during the calculation. */ uint64_t riscv_compute_fdt_addr (hwaddr dram_base,hwaddr dram_size, -MachineState *ms,RISCVBootInfo *info) +MachineState *ms,const RISCVBootInfo *info) {int ret =fdt_pack (ms->fdt);hwaddr dram_end, temp;
Signature · 1 line
2.47.3
Re: [PATCH 1/4] hw/riscv/boot: Make RISCVBootInfo const where possible
Quoted 9 lines · Joel Stanley
As with
riscv_load_firmware, take a const pointer in functions that reads the structure without writing.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>--- include/hw/riscv/boot.h | 6 +++--- hw/riscv/boot.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
Re: [PATCH 1/4] hw/riscv/boot: Make RISCVBootInfo const where possible
In reply to Joel StanleyQuoted 9 lines · Joel Stanley
As with
riscv_load_firmware, take a const pointer in functions that reads the structure without writing.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>--- include/hw/riscv/boot.h | 6 +++--- hw/riscv/boot.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
Quoted 58 lines
include/hw/riscv/boot.h +3
-3@@ -50,10 +50,10 @@ void riscv_boot_info_init(RISCVBootInfo *info, RISCVHartArrayState *harts);void riscv_boot_info_init_discontig_mem (RISCVBootInfo *info,RISCVHartArrayState *harts,hwaddr low_start,hwaddr low_size); -vaddr riscv_calc_kernel_start_addr (RISCVBootInfo *info, +vaddr riscv_calc_kernel_start_addr (const RISCVBootInfo *info,hwaddr firmware_end_addr);hwaddr riscv_find_and_load_firmware (MachineState *machine, -RISCVBootInfo *info, +const RISCVBootInfo *info,const char *default_machine_firmware,hwaddr *firmware_load_addr,symbol_fn_t sym_cb);@@ -71,7 +71,7 @@ void riscv_load_kernel(MachineState *machine,bool load_initrd, symbol_fn_t sym_cb);uint64_t riscv_compute_fdt_addr (hwaddr dram_base,hwaddr dram_size, -MachineState *ms,RISCVBootInfo *info); +MachineState *ms,const RISCVBootInfo *info);void riscv_load_fdt (hwaddr fdt_addr,void *fdt); void riscv_setup_rom_reset_vec(MachineState *machine, RISCVHartArrayState *harts, hwaddr saddr,hw/riscv/boot.c +3
-3@@ -91,7 +91,7 @@ void riscv_boot_info_init_discontig_mem(RISCVBootInfo *info, info->ram_low_size = low_size; } -vaddr riscv_calc_kernel_start_addr (RISCVBootInfo *info, +vaddr riscv_calc_kernel_start_addr (const RISCVBootInfo *info,hwaddr firmware_end_addr) {if (info->is_32bit) {return QEMU_ALIGN_UP (firmware_end_addr,4 * MiB);@@ -151,7 +151,7 @@ char *riscv_find_firmware(const char *firmware_filename, }hwaddr riscv_find_and_load_firmware (MachineState *machine, -RISCVBootInfo *info, +const RISCVBootInfo *info,const char *default_machine_firmware,hwaddr *firmware_load_addr,symbol_fn_t sym_cb)@@ -348,7 +348,7 @@ out:* The FDT is fdt_packed() during the calculation. */ uint64_t riscv_compute_fdt_addr (hwaddr dram_base,hwaddr dram_size, -MachineState *ms,RISCVBootInfo *info) +MachineState *ms,const RISCVBootInfo *info) {int ret =fdt_pack (ms->fdt);hwaddr dram_end, temp;
Re: [PATCH 1/4] hw/riscv/boot: Make RISCVBootInfo const where possible
In reply to Joel StanleyQuoted 5 lines · Joel Stanley
As with
riscv_load_firmware, take a const pointer in functions that reads the structure without writing.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>
Alistair
Quoted 73 lines
---
include/hw/riscv/boot.h | 6 +++---
hw/riscv/boot.c | 6 +++---2 files changed, 6 insertions(+), 6 deletions(-)include/hw/riscv/boot.h +0
-0@@ -50,10 +50,10 @@ void riscv_boot_info_init(RISCVBootInfo *info, RISCVHartArrayState *harts); void riscv_boot_info_init_discontig_mem(RISCVBootInfo *info, RISCVHartArrayState *harts,hwaddr
low_start, hwaddrlow_size);include/hw/riscv/boot.h +1
-1-vaddr riscv_calc_kernel_start_addr(RISCVBootInfo *info, +vaddr riscv_calc_kernel_start_addr(const RISCVBootInfo *info,hwaddr
firmware_end_addr); hwaddr riscv_find_and_load_firmware(MachineState *machine, - RISCVBootInfo *info, + const RISCVBootInfo *info, const char*default_machine_firmware,
hwaddr*firmware_load_addr,symbol_fn_tsym_cb);include/hw/riscv/boot.h +1
-1@@ -71,7 +71,7 @@ void riscv_load_kernel(MachineState *machine, bool load_initrd, symbol_fn_t sym_cb); uint64_t riscv_compute_fdt_addr(hwaddr dram_base, hwaddr dram_size, - MachineState *ms, RISCVBootInfo *info); + MachineState *ms, const RISCVBootInfo *info); void riscv_load_fdt(hwaddr fdt_addr, void *fdt);void riscv_setup_rom_reset_vec(MachineState *machine, RISCVHartArrayState *harts,
hwaddr saddr,hw/riscv/boot.c +0
-0@@ -91,7 +91,7 @@ void riscv_boot_info_init_discontig_mem(RISCVBootInfo *info, info->ram_low_size = low_size; }hw/riscv/boot.c +1
-1-vaddr riscv_calc_kernel_start_addr(RISCVBootInfo *info, +vaddr riscv_calc_kernel_start_addr(const RISCVBootInfo *info,hwaddr
firmware_end_addr) { if (info->is_32bit) {
returnQEMU_ALIGN_UP(firmware_end_addr, 4 * MiB);hw/riscv/boot.c +0
-0@@ -151,7 +151,7 @@ char *riscv_find_firmware(const char *firmware_filename, }
hwaddr riscv_find_and_load_firmware(MachineState *machine, - RISCVBootInfo *info, + const RISCVBootInfo *info, const char*default_machine_firmware,
hwaddr*firmware_load_addr,symbol_fn_tsym_cb)hw/riscv/boot.c +1
-1@@ -348,7 +348,7 @@ out:* The FDT is fdt_packed() during the calculation. */ uint64_t riscv_compute_fdt_addr(hwaddr dram_base, hwaddr dram_size, - MachineState *ms, RISCVBootInfo *info) + MachineState *ms, const RISCVBootInfo *info) {int ret =
fdt_pack(ms->fdt);
hwaddrdram_end, temp;
PATCH 2/4 hw/riscv/virt: Use hwaddr for IMSIC device tree address
In reply to Joel Stanleycreate_fdt_one_imsic() hard codes the top 32 bits to zero. Instead take a hwaddr and populate both the high and low cell.
--- hw/riscv/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
hw/riscv/virt.c +3 -2
@@ -383,7 +383,8 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, g_autofree char *imsic_name = NULL;MachineState *ms =MACHINE (s);int socket_count =riscv_socket_count (ms); -uint32_t imsic_max_hart_per_socket, imsic_addr, imsic_size; +uint32_t imsic_max_hart_per_socket, imsic_size; +hwaddr imsic_addr; g_autofree uint32_t *imsic_cells = NULL; g_autofree uint32_t *imsic_regs = NULL;static const char *const imsic_compat[2 ] = {
@@ -403,7 +404,7 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, imsic_addr = base_addr + socket *VIRT_IMSIC_GROUP_MAX_SIZE ; imsic_size =IMSIC_HART_SIZE (imsic_guest_bits) * s->soc[socket].num_harts; - imsic_regs[socket *4 +0 ] =0 ; + imsic_regs[socket *4 +0 ] =cpu_to_be32 (imsic_addr >>32 ); imsic_regs[socket *4 +1 ] =cpu_to_be32 (imsic_addr); imsic_regs[socket *4 +2 ] =0 ; imsic_regs[socket *4 +3 ] =cpu_to_be32 (imsic_size);
Signature · 1 line
2.47.3
Re: [PATCH 2/4] hw/riscv/virt: Use hwaddr for IMSIC device tree address
Quoted 8 lines · Joel Stanley
create_fdt_one_imsic()hard codes the top 32 bits to zero. Instead take a hwaddr and populate both the high and low cell.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>--- hw/riscv/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Quoted 16 lines
hw/riscv/virt.c +2
-1@@ -383,7 +383,8 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, g_autofree char *imsic_name = NULL;MachineState *ms =MACHINE (s);int socket_count =riscv_socket_count (ms); -uint32_t imsic_max_hart_per_socket, imsic_addr, imsic_size; +uint32_t imsic_max_hart_per_socket, imsic_size; +hwaddr imsic_addr; g_autofree uint32_t *imsic_cells = NULL; g_autofree uint32_t *imsic_regs = NULL;static const char *const imsic_compat[2 ] = {
hw/riscv/virt.c static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, · line 409
Quoted 7 lines
hw/riscv/virt.c +1
-1@@ -403,7 +404,7 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, imsic_addr = base_addr + socket *VIRT_IMSIC_GROUP_MAX_SIZE ; imsic_size =IMSIC_HART_SIZE (imsic_guest_bits) * s->soc[socket].num_harts; - imsic_regs[socket *4 +0 ] =0 ; + imsic_regs[socket *4 +0 ] =cpu_to_be32 (imsic_addr >>32 ); imsic_regs[socket *4 +1 ] =cpu_to_be32 (imsic_addr); imsic_regs[socket *4 +2 ] =0 ;
I assume the imsic size cannot be greater than 32-bits.
Quoted 1 line
hw/riscv/virt.c +0
-0imsic_regs[socket *4 +3 ] =cpu_to_be32 (imsic_size);
Re: [PATCH 2/4] hw/riscv/virt: Use hwaddr for IMSIC device tree address
In reply to Joel StanleyQuoted 6 lines · Joel Stanley
create_fdt_one_imsic()hard codes the top 32 bits to zero. Instead take
a hwaddr and populate both the high and low cell.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>
Alistair
Quoted 29 lines
---
hw/riscv/virt.c | 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)hw/riscv/virt.c +2
-1@@ -383,7 +383,8 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, g_autofree char *imsic_name = NULL; MachineState *ms = MACHINE(s); int socket_count = riscv_socket_count(ms); - uint32_t imsic_max_hart_per_socket, imsic_addr, imsic_size; + uint32_t imsic_max_hart_per_socket, imsic_size; + hwaddr imsic_addr; g_autofree uint32_t *imsic_cells = NULL; g_autofree uint32_t *imsic_regs = NULL;static const char * const imsic_compat[2] = {
hw/riscv/virt.c +0
-0@@ -403,7 +404,7 @@ static void create_fdt_one_imsic(RISCVVirtState *s, hwaddr base_addr, imsic_addr = base_addr + socket * VIRT_IMSIC_GROUP_MAX_SIZE;
imsic_size=IMSIC_HART_SIZE(imsic_guest_bits)* s->soc[socket].num_harts;
- imsic_regs[socket * 4 + 0] = 0;
+ imsic_regs[socket * 4 + 0] =cpu_to_be32(imsic_addr >> 32); imsic_regs[socket * 4 + 1] =cpu_to_be32(imsic_addr); imsic_regs[socket * 4 + 2] = 0; imsic_regs[socket * 4 + 3] =cpu_to_be32(imsic_size);
PATCH 3/4 tests/functional: Avoid unnecessary removal of scratch files
In reply to Joel StanleyFiles written by uncompress() and archive_extract() are placed in a temporary directory that is cleaned up when the test exits, making os.remove() redundant. Drop it and the unused os import.
--- tests/functional/arm/test_bpim2u.py | 11 ----------- tests/functional/arm/test_orangepi.py | 9 --------- tests/functional/riscv64/test_sifive_u.py | 4 ---- 3 files changed, 24 deletions(-)
tests/functional/arm/test_bpim2u.py +0 -11
@@ -5,8 +5,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -import os - from qemu_test import LinuxKernelTest, exec_command_and_wait_for_pattern from qemu_test import Asset, interrupt_interactive_console_until_pattern from qemu_test import skipBigDataTest
@@ -54,8 +52,6 @@ def test_arm_bpim2u(self): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) - os.remove(kernel_path) - os.remove(dtb_path) def test_arm_bpim2u_initrd(self): self.set_machine('bpim2u')
@@ -86,9 +82,6 @@ def test_arm_bpim2u_initrd(self): 'reboot: Restarting system') # Wait for VM to shut down gracefully self.vm.wait() - os.remove(kernel_path) - os.remove(dtb_path) - os.remove(initrd_path) def test_arm_bpim2u_gmac(self): self.set_machine('bpim2u')
@@ -133,9 +126,6 @@ def test_arm_bpim2u_gmac(self): 'reboot: Restarting system') # Wait for VM to shut down gracefully self.vm.wait() - os.remove(kernel_path) - os.remove(dtb_path) - os.remove(rootfs_path) @skipBigDataTest() def test_arm_bpim2u_openwrt_22_03_3(self):
@@ -174,7 +164,6 @@ def test_arm_bpim2u_openwrt_22_03_3(self): 'Allwinner sun8i Family') exec_command_and_wait_for_pattern(self, 'cat /proc/iomem', 'system-control@1c00000') - os.remove(image_path) if __name__ == '__main__': LinuxKernelTest.main()
tests/functional/arm/test_orangepi.py +0 -9
@@ -5,7 +5,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -import os import shutil from qemu_test import LinuxKernelTest, exec_command_and_wait_for_pattern
@@ -65,8 +64,6 @@ def test_arm_orangepi(self): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) - os.remove(kernel_path) - os.remove(dtb_path) def test_arm_orangepi_initrd(self): self.set_machine('orangepi-pc')
@@ -97,9 +94,6 @@ def test_arm_orangepi_initrd(self): 'reboot: Restarting system') # Wait for VM to shut down gracefully self.vm.wait() - os.remove(kernel_path) - os.remove(dtb_path) - os.remove(initrd_path) def test_arm_orangepi_sd(self): self.set_machine('orangepi-pc')
@@ -140,9 +134,6 @@ def test_arm_orangepi_sd(self): 'reboot: Restarting system') # Wait for VM to shut down gracefully self.vm.wait() - os.remove(kernel_path) - os.remove(dtb_path) - os.remove(rootfs_path) @skipBigDataTest() def test_arm_orangepi_armbian(self):
tests/functional/riscv64/test_sifive_u.py +0 -4
@@ -10,8 +10,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -import os - from qemu_test import Asset, LinuxKernelTest
@@ -49,8 +47,6 @@ def do_test_riscv64_sifive_u_mmc_spi(self, connect_card): self.vm.launch() self.wait_for_console_pattern(pattern) - os.remove(rootfs_path) - def test_riscv64_sifive_u_nommc_spi(self): self.do_test_riscv64_sifive_u_mmc_spi(False)
Signature · 1 line
2.47.3
Re: [PATCH 3/4] tests/functional: Avoid unnecessary removal of scratch files
Quoted 11 lines · Joel Stanley
Files written by
uncompress()andarchive_extract()are placed in a temporary directory that is cleaned up when the test exits, makingos.remove()redundant. Drop it and the unused os import.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>--- tests/functional/arm/test_bpim2u.py | 11 ----------- tests/functional/arm/test_orangepi.py | 9 --------- tests/functional/riscv64/test_sifive_u.py | 4 ---- 3 files changed, 24 deletions(-)
Re: [PATCH 3/4] tests/functional: Avoid unnecessary removal of scratch files
In reply to Joel StanleyQuoted 6 lines · Joel Stanley
Files written by
uncompress()andarchive_extract()are placed in a temporary directory that is cleaned up when the test exits, makingos.remove()redundant. Drop it and the unused os import.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>
Alistair
Quoted 134 lines
---
tests/functional/arm/test_bpim2u.py | 11 ----------- tests/functional/arm/test_orangepi.py | 9 ---------tests/functional/riscv64/test_sifive_u.py| 4 ----3 files changed, 24 deletions(-)tests/functional/arm/test_bpim2u.py +0
-0@@ -5,8 +5,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-latertests/functional/arm/test_bpim2u.py +0
-2-import os -from
qemu_testimport LinuxKernelTest,exec_command_and_wait_for_pattern
fromqemu_testimport Asset,interrupt_interactive_console_until_pattern
fromqemu_testimport skipBigDataTesttests/functional/arm/test_bpim2u.py +0
-0@@ -54,8 +52,6 @@ def test_arm_bpim2u(self): self.vm.launch()
console_pattern= 'Kernel command line: %s' %kernel_command_lineself.wait_for_console_pattern(console_pattern)-os.remove(kernel_path)
-os.remove(dtb_path)
deftest_arm_bpim2u_initrd(self):
self.set_machine('bpim2u')tests/functional/arm/test_bpim2u.py +0
-0@@ -86,9 +82,6 @@ def test_arm_bpim2u_initrd(self):'reboot: Restarting system')
# Wait for VM to shut down gracefullyself.vm.wait()
-os.remove(kernel_path)
-os.remove(dtb_path)
-os.remove(initrd_path)
deftest_arm_bpim2u_gmac(self):
self.set_machine('bpim2u')tests/functional/arm/test_bpim2u.py +0
-0@@ -133,9 +126,6 @@ def test_arm_bpim2u_gmac(self):'reboot: Restarting system')
# Wait for VM to shut down gracefullyself.vm.wait()
-os.remove(kernel_path)
-os.remove(dtb_path)
-os.remove(rootfs_path)
@skipBigDataTest()
deftest_arm_bpim2u_openwrt_22_03_3(self):tests/functional/arm/test_bpim2u.py +0
-0@@ -174,7 +164,6 @@ def test_arm_bpim2u_openwrt_22_03_3(self):'Allwinner sun8i Family')
exec_command_and_wait_for_pattern(self, 'cat/proc/iomem',
'system-control@1c00000')
-os.remove(image_path)
if__name__== '__main__':
LinuxKernelTest.main()tests/functional/arm/test_orangepi.py +0
-0@@ -5,7 +5,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later
-import os
import shutil
fromqemu_testimport LinuxKernelTest,exec_command_and_wait_for_patterntests/functional/arm/test_orangepi.py +0
-0@@ -65,8 +64,6 @@ def test_arm_orangepi(self): self.vm.launch()
console_pattern= 'Kernel command line: %s' %kernel_command_lineself.wait_for_console_pattern(console_pattern)-os.remove(kernel_path)
-os.remove(dtb_path)
deftest_arm_orangepi_initrd(self):
self.set_machine('orangepi-pc')tests/functional/arm/test_orangepi.py +0
-0@@ -97,9 +94,6 @@ def test_arm_orangepi_initrd(self):'reboot: Restarting system')
# Wait for VM to shut down gracefullyself.vm.wait()
-os.remove(kernel_path)
-os.remove(dtb_path)
-os.remove(initrd_path)
deftest_arm_orangepi_sd(self):
self.set_machine('orangepi-pc')tests/functional/arm/test_orangepi.py +0
-0@@ -140,9 +134,6 @@ def test_arm_orangepi_sd(self):'reboot: Restarting system')
# Wait for VM to shut down gracefullyself.vm.wait()
-os.remove(kernel_path)
-os.remove(dtb_path)
-os.remove(rootfs_path)
@skipBigDataTest()
deftest_arm_orangepi_armbian(self):tests/functional/riscv64/test_sifive_u.py +0
-0@@ -10,8 +10,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-latertests/functional/riscv64/test_sifive_u.py +0
-2-import os -from
qemu_testimport Asset, LinuxKernelTesttests/functional/riscv64/test_sifive_u.py +0
-0@@ -49,8 +47,6 @@ def do_test_riscv64_sifive_u_mmc_spi(self,
connect_card):
self.vm.launch()self.wait_for_console_pattern(pattern)
-os.remove(rootfs_path)
-
deftest_riscv64_sifive_u_nommc_spi(self):
self.do_test_riscv64_sifive_u_mmc_spi(False)
PATCH 4/4 hw/riscv/atlantis: Document QEMU-only I2C device tree nodes
In reply to Joel StanleyThe QEMU only I2C devices have a comment next to them, do the same for the corresponding device tree entries.
--- hw/riscv/tt_atlantis.c | 1 + 1 file changed, 1 insertion(+)
hw/riscv/tt_atlantis.c +1 -0
@@ -356,6 +356,7 @@ static void finalize_fdt(TTAtlantisState *s) aplic_s_phandle, periph_clk_phandle); } +/* I2C peripherals: qemu specific */ create_fdt_i2c_device (s,0 ,"dallas,ds1338" ,0x6f );create_fdt_i2c_device (s,4 ,"ti,tmp105" ,0x48 ); }
Signature · 1 line
2.47.3
Re: [PATCH 4/4] hw/riscv/atlantis: Document QEMU-only I2C device tree nodes
Quoted 8 lines · Joel Stanley
The QEMU only I2C devices have a comment next to them, do the same for the corresponding device tree entries.
Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>--- hw/riscv/tt_atlantis.c | 1 + 1 file changed, 1 insertion(+)
Re: [PATCH 4/4] hw/riscv/atlantis: Document QEMU-only I2C device tree nodes
In reply to Joel StanleyQuoted 6 lines · Joel Stanley
The QEMU only I2C devices have a comment next to them, do the same for
the corresponding device tree entries.Suggested-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Joel Stanley <[email protected]>
Alistair
Quoted 16 lines
---
hw/riscv/tt_atlantis.c | 1 +1 file changed, 1 insertion(+)hw/riscv/tt_atlantis.c +0
-0@@ -356,6 +356,7 @@ static void finalize_fdt(TTAtlantisState *s) aplic_s_phandle, periph_clk_phandle); }
+ /* I2C peripherals: qemu specific */create_fdt_i2c_device(s, 0, "dallas,ds1338", 0x6f);create_fdt_i2c_device(s, 4, "ti,tmp105", 0x48); }
Quoted 4 lines · Joel Stanley
Phil made a bunch of suggestions during the Atlantis review for things to clean up afterwards. Here are those cleanups. The patches are otherwise unrelated.
Doh, sorry, patches went to Phil's old address. Adding him to cc here.
Cheers,
Joel
Alistair Francis
AppliedQuoted 10 lines · Joel Stanley
Phil made a bunch of suggestions during the Atlantis review for things
to clean up afterwards. Here are those cleanups. The patches are otherwise unrelated.Joel Stanley (4):
hw/riscv/boot: Make RISCVBootInfo const where possible hw/riscv/virt: Use hwaddr for IMSIC device tree address tests/functional: Avoid unnecessary removal of scratch files hw/riscv/atlantis: Document QEMU-only I2C device tree nodes
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 9 lines
include/hw/riscv/boot.h | 6 +++--- hw/riscv/boot.c | 6 +++--- hw/riscv/tt_atlantis.c | 1 + hw/riscv/virt.c | 5 +++-- tests/functional/arm/test_bpim2u.py | 11 ----------- tests/functional/arm/test_orangepi.py | 9 ---------
tests/functional/riscv64/test_sifive_u.py| 4 ----7 files changed, 10 insertions(+), 32 deletions(-)