You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "CV-Bowen (via GitHub)" <gi...@apache.org> on 2024/01/04 11:40:30 UTC
[PR] virtio-mmio: avoid output error log when not found mmio device [nuttx]
CV-Bowen opened a new pull request, #11482:
URL: https://github.com/apache/nuttx/pull/11482
## Summary
Not found the mmio device is a normal case, so should not print the error log.
This commit changes the log level to info when not found the mmio device.
## Impact
Remove unnecessary error log
## Testing
qemu-armv8a:netnsh with error log enable
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] virtio-mmio: avoid output error log when not found mmio device [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #11482:
URL: https://github.com/apache/nuttx/pull/11482#discussion_r1442393602
##########
drivers/virtio/virtio-mmio.c:
##########
@@ -842,7 +842,12 @@ int virtio_register_mmio_device(FAR void *regs, int irq)
}
ret = virtio_mmio_init_device(vmdev, regs, irq);
- if (ret < 0)
+ if (ret == -ENODEV)
Review Comment:
The virtio device should be parsed from the device tree, right? Why need special handling here?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] virtio-mmio: avoid output error log when not found mmio device [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #11482:
URL: https://github.com/apache/nuttx/pull/11482
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] virtio-mmio: avoid output error log when not found mmio device [nuttx]
Posted by "CV-Bowen (via GitHub)" <gi...@apache.org>.
CV-Bowen commented on code in PR #11482:
URL: https://github.com/apache/nuttx/pull/11482#discussion_r1442434364
##########
drivers/virtio/virtio-mmio.c:
##########
@@ -842,7 +842,12 @@ int virtio_register_mmio_device(FAR void *regs, int irq)
}
ret = virtio_mmio_init_device(vmdev, regs, irq);
- if (ret < 0)
+ if (ret == -ENODEV)
Review Comment:
The device tree directly passes all the mmio base registers to virtio_register_mmio_device(), because it cannot judge whether this mmio bus is used or not. Follow shows the device tree dump:
```c
nsh> fdtdump /proc/fdt
**** fdtdump is a low-level debugging tool, not meant for general use.
**** If you want to decompile a dtb, you probably want
**** dtc -I dtb -O dts <filename>
/dts-v1/;
// magic: 0xd00dfeed
// totalsize: 0x100000 (1048576)
// off_dt_struct: 0x40
// off_dt_strings: 0x1bbc
// off_mem_rsvmap: 0x30
// version: 17
// last_comp_version: 16
// boot_cpuid_phys: 0x0
// size_dt_strings: 0x1e8
// size_dt_struct: 0x1b7c
/ {
...
virtio_mmio@a000000 {
dma-coherent;
interrupts = <0x00000000 0x00000010 0x00000001>;
reg = <0x00000000 0x0a000000 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a000200 {
dma-coherent;
interrupts = <0x00000000 0x00000011 0x00000001>;
reg = <0x00000000 0x0a000200 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a000400 {
dma-coherent;
interrupts = <0x00000000 0x00000012 0x00000001>;
reg = <0x00000000 0x0a000400 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a000600 {
dma-coherent;
interrupts = <0x00000000 0x00000013 0x00000001>;
reg = <0x00000000 0x0a000600 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a000800 {
dma-coherent;
interrupts = <0x00000000 0x00000014 0x00000001>;
reg = <0x00000000 0x0a000800 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a000a00 {
dma-coherent;
interrupts = <0x00000000 0x00000015 0x00000001>;
reg = <0x00000000 0x0a000a00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a000c00 {
dma-coherent;
interrupts = <0x00000000 0x00000016 0x00000001>;
reg = <0x00000000 0x0a000c00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a000e00 {
dma-coherent;
interrupts = <0x00000000 0x00000017 0x00000001>;
reg = <0x00000000 0x0a000e00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001000 {
dma-coherent;
interrupts = <0x00000000 0x00000018 0x00000001>;
reg = <0x00000000 0x0a001000 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001200 {
dma-coherent;
interrupts = <0x00000000 0x00000019 0x00000001>;
reg = <0x00000000 0x0a001200 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001400 {
dma-coherent;
interrupts = <0x00000000 0x0000001a 0x00000001>;
reg = <0x00000000 0x0a001400 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001600 {
dma-coherent;
interrupts = <0x00000000 0x0000001b 0x00000001>;
reg = <0x00000000 0x0a001600 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001800 {
dma-coherent;
interrupts = <0x00000000 0x0000001c 0x00000001>;
reg = <0x00000000 0x0a001800 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001a00 {
dma-coherent;
interrupts = <0x00000000 0x0000001d 0x00000001>;
reg = <0x00000000 0x0a001a00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001c00 {
dma-coherent;
interrupts = <0x00000000 0x0000001e 0x00000001>;
reg = <0x00000000 0x0a001c00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a001e00 {
dma-coherent;
interrupts = <0x00000000 0x0000001f 0x00000001>;
reg = <0x00000000 0x0a001e00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002000 {
dma-coherent;
interrupts = <0x00000000 0x00000020 0x00000001>;
reg = <0x00000000 0x0a002000 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002200 {
dma-coherent;
interrupts = <0x00000000 0x00000021 0x00000001>;
reg = <0x00000000 0x0a002200 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002400 {
dma-coherent;
interrupts = <0x00000000 0x00000022 0x00000001>;
reg = <0x00000000 0x0a002400 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002600 {
dma-coherent;
interrupts = <0x00000000 0x00000023 0x00000001>;
reg = <0x00000000 0x0a002600 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002800 {
dma-coherent;
interrupts = <0x00000000 0x00000024 0x00000001>;
reg = <0x00000000 0x0a002800 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002a00 {
dma-coherent;
interrupts = <0x00000000 0x00000025 0x00000001>;
reg = <0x00000000 0x0a002a00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002c00 {
dma-coherent;
interrupts = <0x00000000 0x00000026 0x00000001>;
reg = <0x00000000 0x0a002c00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a002e00 {
dma-coherent;
interrupts = <0x00000000 0x00000027 0x00000001>;
reg = <0x00000000 0x0a002e00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003000 {
dma-coherent;
interrupts = <0x00000000 0x00000028 0x00000001>;
reg = <0x00000000 0x0a003000 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003200 {
dma-coherent;
interrupts = <0x00000000 0x00000029 0x00000001>;
reg = <0x00000000 0x0a003200 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003400 {
dma-coherent;
interrupts = <0x00000000 0x0000002a 0x00000001>;
reg = <0x00000000 0x0a003400 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003600 {
dma-coherent;
interrupts = <0x00000000 0x0000002b 0x00000001>;
reg = <0x00000000 0x0a003600 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003800 {
dma-coherent;
interrupts = <0x00000000 0x0000002c 0x00000001>;
reg = <0x00000000 0x0a003800 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003a00 {
dma-coherent;
interrupts = <0x00000000 0x0000002d 0x00000001>;
reg = <0x00000000 0x0a003a00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003c00 {
dma-coherent;
interrupts = <0x00000000 0x0000002e 0x00000001>;
reg = <0x00000000 0x0a003c00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
virtio_mmio@a003e00 {
dma-coherent;
interrupts = <0x00000000 0x0000002f 0x00000001>;
reg = <0x00000000 0x0a003e00 0x00000000 0x00000200>;
compatible = "virtio,mmio";
};
...
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org