[PATCH 0/3] soc: qcom: apr: improve RX processing

From: Srinivas Kandagatla

Date: Thu May 14 2026 - 11:52:35 EST


Hi all,

This series contains a couple of APR enhancements and a rework of the RX
processing path.

The first two patches makes code more robust for trival issues in the APR core.

Remove stale service entries from the IDR when apr_add_device()
fails before the device is registered.
Validate incoming packet lengths using the header size appropriate
for the active packet router type (APR or GPR).

The final patch moves RX buffering and work items from the packet
router to individual services.

Today all incoming packets are serialized through a single work item and
a global RX queue. If one service callback blocks or takes a long time
to complete, packet processing for all other services is delayed. This
can lead to command timeouts when responses are stuck behind unrelated
work.

With this change, packets are queued and processed on a per-service
basis, preserving message ordering within each service while allowing
unrelated services to make progress independently. Since queued packets
may outlive service removal, a reference count is added to keep the
service object alive until all queued packets have been processed.

The shared APR workqueue is also converted to an unbound reclaim
workqueue so multiple services can process packets in parallel.

Thanks,
Srini

Srinivas Kandagatla (3):
soc: qcom: apr: Remove service from IDR before registration failure
soc: qcom: apr: Check response packet length by router type
soc: qcom: apr: Process RX messages using per-service work items

drivers/soc/qcom/apr.c | 283 ++++++++++++++++++++++++-----------
include/linux/soc/qcom/apr.h | 6 +
2 files changed, 200 insertions(+), 89 deletions(-)

--
2.47.3