From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Physical address access / Temporary MMU disable
Date: Mon, 17 May 2010 10:15:17 +0100 [thread overview]
Message-ID: <20100517091517.GF23118@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTinERP4BJFMXWtQqrwxPBtvb1lpJ73yQzO-Wb5zp@mail.gmail.com>
On Mon, May 17, 2010 at 11:04:09AM +0200, Hans H?bner wrote:
> I am implementing a device driver that has very strict timing and
> jitter requirements. It uses a FIQ handler, written in assembly, that
> transfers data from the on-chip SRAM to GPIO ports. In the default
> configuration, it appears that the FIQ handler is invoked with the MMU
> enabled, so the SRAM (and I/O) accesses are undergoing virtual address
> translation. If there is a TLB miss, this means that the MMU tables
> in SDRAM are consulted, which violates the timing requirements of my
> driver.
>
> In order to reduce FIQ response time jitter, I would like to not use
> virtual addresses in the FIQ handler. Is disabling the MMU for the
> duration of the FIQ handler through the CP15 coprocessor register the
> right way to do this, or is there another way to make some section of
> code use physical addresses?
If you can't tolerate the delay it takes for a TLB miss, you certainly
can't tolerate the delay it would take to disable and flush caches, and
re-enable the MMU. (You can't just disable the MMU - you must disable
the data cache as well.)
It sounds like you instead need to think about TLB lockdown.
prev parent reply other threads:[~2010-05-17 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 9:04 Physical address access / Temporary MMU disable Hans Hübner
2010-05-17 9:15 ` Russell King - ARM Linux [this message]
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=20100517091517.GF23118@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).