diff options
| author | Nicolin Chen <nicolinc@nvidia.com> | 2026-09-15 09:38:15 -0700 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-10-04 16:01:29 +0000 |
| commit | 02b5c4639bcd3a07f1fad7662da32b8b73371597 (patch) | |
| tree | 8f13d126bc94b8b9ed59d020bcdb5a4496972d4f /scripts/basic | |
| parent | 580bbfcdcd2e2be5e29e19acbe4be44da9be2837 (diff) | |
| download | linux-02b5c4639bcd3a07f1fad7662da32b8b73371597.tar.gz linux-02b5c4639bcd3a07f1fad7662da32b8b73371597.zip | |
iommu/arm-smmu-v3: Add Q_POS() macro
A queue position, the wrap bit combined with the index, is Q_WRP | Q_IDX.
It is a (max_n_shift + 1)-bit value that wraps at twice the queue capacity.
queue_inc_cons(), queue_sync_cons_ovf(), and queue_inc_prod_n() currently
compute such positions by open-coding the two macros at each call site.
Add a Q_POS() macro and switch the open-coded sites to it.
A subsequent change will build a Q_DIFF() on it, to count the entries that
a queue pointer moved past.
No functional change intended.
Assisted-by: LLM
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
