Order of Properties in Device Node
The following order of properties in device nodes is preferred:
“compatible”
“reg”
“ranges”
Standard/common properties (defined by common bindings,
e.g. without vendor-prefixes)
Vendor-specific properties
“status” (if applicable)
Child nodes, where each node is preceded with a blank line
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
The UART monitor backend sends every byte with uart_poll_out(). At
common UART rates this blocks the Bluetooth host while HCI traffic
and logs are serialized.
Add an opt-in interrupt-driven mode that buffers complete monitor
records and drains them from the UART interrupt handler. Record
fragments are copied in with ring_buf_put_ptr() and published with a
single ring_buf_commit(), so a record is either fully present in the
buffer or absent. This matters on panic: the panic handler flushes
only complete records before switching to polling, keeping the
stream parseable. Only the header-inline zero-copy ring buffer API
is used, so the option does not need to select RING_BUFFER.
A record that does not fit is dropped whole and reported through the
existing drop counters. Counts already consumed into a dropped
record's header are restored, keeping the accounting exact across
consecutive drops, and counts exceeding the 8-bit header field carry
over to the next record. Both kinds of loss previously also affected
the RTT backend, which shares this code.
Polling output remains the default and the panic-mode fallback,
since interrupts may no longer run during panic handling. It is also
the runtime fallback when the monitor UART driver lacks interrupt
support, since SERIAL_SUPPORT_INTERRUPT only guarantees that some
driver has it. The option depends on !LOG_MODE_MINIMAL because
minimal logging has no panic hook to flush buffered output.
Measured on nrf52dk/nrf52832 and xg24_rb4186c with a peripheral
flooding GATT notifications and the monitor sharing the 115200 baud
console UART: polling caps throughput at 5.9-6.6 KB/s, slows a paced
25 notifications/s workload to 15/s and blocks the producing context
~6 ms per large record (10-line printk burst: 58-65 ms). The
interrupt-driven mode restores radio-limited throughput (41 KB/s)
and the nominal paced rate, with the same burst at 0.8-1.3 ms. The
trade-off is load shedding: under sustained overload ~87% of
full-size ACL records are dropped (and accounted), while small
records such as Number of Completed Packets events keep flowing.
Unit tests cover contiguous and wrapped records, failed
reservations, zero-length fragments and exact-fit records; an
integration test runs the real producer/ISR path against the
emulated serial-test UART, covering drain, buffer-full drops with
accounting, and wrap-around consistency. The Bluetooth init test
builds the interrupt-driven path with the deferred log backend,
since tests default to minimal logging. Builds also pass with
polling UART and RTT.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>