linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Paul Pawlowski <mrarmdev@gmail.com>, linux-mm@kvack.org
Subject: Re: Do DMA mappings get cleared on suspend?
Date: Tue, 20 Aug 2019 11:37:45 +0100	[thread overview]
Message-ID: <1566297465.2657.14.camel@HansenPartnership.com> (raw)
In-Reply-To: <CAKSqxP85cbYXt6q72aajXUTombZb-wbEfoWteBQrjJFO890rfg@mail.gmail.com>

On Mon, 2019-08-19 at 21:49 +0200, Paul Pawlowski wrote:
> Hello,
> Do DMA mappings get cleared when the device is suspended to RAM? A
> device I'm writing a driver for requires the DMA addresses not to
> change after a resume and trying to use DMA memory allocated before
> the suspend causes a device error. Is there a way to persist the
> mappings through a suspend?

What are you actually asking?  The state of the IOMMU mappings should
be saved and restored on suspend/resume.  However, whether mappings
that are inside actual PCI devices are saved and restored depends on
the actual device.  In general we don't expect them to remember in-
flight I/O which is why I/O is quiesced before devices are suspended,
so the device should be inactive and any I/O in the upper layers will
be mapped on resume.  The DMA addresses of the mailboxes are usually
saved and restored, but how is up to the driver.

James



  reply	other threads:[~2019-08-20 10:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 19:49 Paul Pawlowski
2019-08-20 10:37 ` James Bottomley [this message]
2019-08-20 11:58   ` Paul Pawlowski
2019-08-20 15:58     ` Paul Pawlowski

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=1566297465.2657.14.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-mm@kvack.org \
    --cc=mrarmdev@gmail.com \
    /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