Thread (1 message) 1 message, 1 author, 2014-10-01
DORMANTno replies

[PATCH v4 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR

From: Mitchel Humpherys <hidden>
Date: 2014-10-01 19:52:04
Also in: linux-iommu

On Wed, Oct 01 2014 at 01:27:27 AM, Arnd Bergmann [off-list ref] wrote:
On Tuesday 30 September 2014 18:28:13 Mitchel Humpherys wrote:
quoted
+       if (readl_poll_timeout_atomic(cb_base + ARM_SMMU_CB_ATSR, tmp,
+                               !(tmp & ATSR_ACTIVE), 50, 100)) {
This looks really bad.

You are doing up to 50 100us delays, each of which can be much longer,
so you can do up to 10ms total delay with interrupts disabled.

Don't do that.
Oh wow somehow I forgot I was in atomic context even though I was
explicitly moving to the `_atomic' polling function in this version.
Don't ask.

Let me ratchet that down to a maximum of 10 delays of 5 microseconds
each for v5.


-Mitch

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help