[PATCH v2] iommu/arm-smmu-v3: poll cmdq until it has space

2021-09-26 Thread Fernand Sieber via iommu
When a thread sends commands to the SMMU, it needs to allocate some space to write its commands in a ring buffer. The allocation algorithms works as follows: until enough free spaced is available in the queue, repeat the following outer loop. First, try to acquire an exclusive lock to read the

[PATCH] iommu/arm-smmu-v3: poll cmdq until it has space

2021-09-21 Thread Fernand Sieber via iommu
When a thread sends commands to the SMMU, it needs to allocate some space to write its commands in a ring buffer. The allocation algorithms works as follows: until enough free spaced is available in the queue, repeat the following outer loop. First, try to acquire an exclusive lock to read the