From: Mitchel Humpherys <mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v4 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR
Date: Wed, 01 Oct 2014 12:52:04 -0700 [thread overview]
Message-ID: <vnkwoatv600r.fsf@mitchelh-linux.qualcomm.com> (raw)
In-Reply-To: <61772524.IxG1939KJq@wuerfel> (Arnd Bergmann's message of "Wed, 01 Oct 2014 10:27:27 +0200")
On Wed, Oct 01 2014 at 01:27:27 AM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> On Tuesday 30 September 2014 18:28:13 Mitchel Humpherys wrote:
>> + 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
WARNING: multiple messages have this Message-ID (diff)
From: mitchelh@codeaurora.org (Mitchel Humpherys)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR
Date: Wed, 01 Oct 2014 12:52:04 -0700 [thread overview]
Message-ID: <vnkwoatv600r.fsf@mitchelh-linux.qualcomm.com> (raw)
In-Reply-To: <61772524.IxG1939KJq@wuerfel> (Arnd Bergmann's message of "Wed, 01 Oct 2014 10:27:27 +0200")
On Wed, Oct 01 2014 at 01:27:27 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 30 September 2014 18:28:13 Mitchel Humpherys wrote:
>> + 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
next prev parent reply other threads:[~2014-10-01 19:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 1:28 [PATCH v4 0/2] iommu/arm-smmu: hard iova_to_phys Mitchel Humpherys
2014-10-01 1:28 ` Mitchel Humpherys
[not found] ` <1412126893-15796-1-git-send-email-mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-10-01 1:28 ` [PATCH v4 1/2] iopoll: Introduce memory-mapped IO polling macros Mitchel Humpherys
2014-10-01 1:28 ` Mitchel Humpherys
[not found] ` <1412126893-15796-2-git-send-email-mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-10-01 8:25 ` Arnd Bergmann
2014-10-01 8:25 ` Arnd Bergmann
2014-10-08 1:47 ` Mitchel Humpherys
2014-10-08 1:47 ` Mitchel Humpherys
[not found] ` <vnkwoatngwmo.fsf-Yf+dfxj6toJBVvN7MMdr1KRtKmQZhJ7pQQ4Iyu8u01E@public.gmane.org>
2014-10-08 13:40 ` Arnd Bergmann
2014-10-08 13:40 ` Arnd Bergmann
2014-10-10 19:44 ` Mitchel Humpherys
2014-10-10 19:44 ` Mitchel Humpherys
[not found] ` <vnkwoatjn1zm.fsf-Yf+dfxj6toJBVvN7MMdr1KRtKmQZhJ7pQQ4Iyu8u01E@public.gmane.org>
2014-10-10 19:50 ` Arnd Bergmann
2014-10-10 19:50 ` Arnd Bergmann
2014-10-10 20:24 ` Mitchel Humpherys
2014-10-10 20:24 ` Mitchel Humpherys
2014-10-09 22:45 ` Mitchel Humpherys
2014-10-09 22:45 ` Mitchel Humpherys
2014-10-01 1:28 ` [PATCH v4 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR Mitchel Humpherys
2014-10-01 1:28 ` Mitchel Humpherys
[not found] ` <1412126893-15796-3-git-send-email-mitchelh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-10-01 8:27 ` Arnd Bergmann
2014-10-01 8:27 ` Arnd Bergmann
2014-10-01 19:52 ` Mitchel Humpherys [this message]
2014-10-01 19:52 ` Mitchel Humpherys
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vnkwoatv600r.fsf@mitchelh-linux.qualcomm.com \
--to=mitchelh-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.