CV-Bowen opened a new pull request, #22344:
URL: https://github.com/apache/nuttx/pull/22344
## Summary
Depends on apache/nuttx#22343 (it changes the line that PR fixes).
- `drivers/pci/pci_qemu_epc: fix nxstyle errors`: two missing blank
lines after declarations in a file the next commit touches.
- `drivers/pci: keep the bus state per CPU in BMP mode`: in BMP mode
every CPU runs its own kernel instance, but the PCI core kept one
global lock and one list each of devices, drivers and controllers,
and the ivshmem bus and the endpoint framework one list each too, so
the CPUs registered into and walked each other's lists. They are now
defined with `DEFINE_PER_CPU_BMP` / `DEFINE_PER_CPU_BSS_BMP`. A
per-CPU copy cannot be given a self-referencing static initializer,
so the lists become `dq_queue_t`, for which all zeroes is an empty
queue, and the list nodes in `struct pci_device_s`, `pci_bus_s`,
`pci_controller_s`, `pci_driver_s`, `pci_epc_ctrl_s`,
`pci_epf_device_s`, `pci_epf_driver_s` and `ivshmem_driver_s` become
`dq_entry_t`.
## Impact
- Without `CONFIG_BMP` the variables stay single instances; behaviour is
unchanged.
- The list members of the public PCI structures listed above change
type from `struct list_node` to `dq_entry_t` / `dq_queue_t`. Every
in-tree user is converted; out-of-tree code that walks these lists
with `list_for_every_entry()` has to use `dq_for_every_entry()`.
Drivers that only declare a `struct pci_driver_s` (or the ivshmem/EPF
driver structures) are not affected.
## Testing
Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
- qemu-armv8a:netnsh with every PCI driver and endpoint option enabled,
BMP off: all objects compile with 0 warnings (same two master
failures as apache/nuttx#22343: arm64 `PCI_MSIX` link, and the old
`mm_initialize_pool()` call in `pci_epc.c`, patched for the test).
- Same configuration with `CONFIG_BMP=y`, `CONFIG_PERCPU_SECTION=y`,
2 CPUs: every PCI object compiles with 0 warnings and its lists and
locks land in `.data..percpu` / `.bss..percpu`. The image does not
link on master: no in-tree linker script places those sections and
`arch/arm64/src/common/arm64_boot.c` uses `_sdata_percpu` undeclared,
so BMP is compile-tested only.
- qemu-intel64:jumbo (x86_64 PCI users) builds.
- Runtime, BMP off: rpmsg baseline below, and the qemu-armv8a:netnsh virtio
cases (virtio devices on PCI; rng, blk on
mmio and PCI): same result as master 01829d2136b. The `ping` and v9fs
cases fail on master too: virtio-net stops answering after the first
ICMP reply since c177a4107dd removed the TX quota it relied on, fixed
by apache/nuttx#22322. All other virtio cases pass.
No regression in rpmsg: sim:rpserver/rpproxy and
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping,
rpmsgfs; 15/15). qemu-armv8a was built with LIBC_ENVPATH and BINFMT_CHECKEXEC
disabled, which current master needs for nxinit to start nsh there; unrelated
to this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]