From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: dw_mmc: use resource_size_t to store physical address
Date: Wed, 18 Nov 2015 17:22:47 +0100 [thread overview]
Message-ID: <6347082.461jehYssD@wuerfel> (raw)
In-Reply-To: <CAHp75VfnD=MPigeTdo8YKPTs4zZN+XcSiMBZkma3ibaT4DEZiQ@mail.gmail.com>
On Wednesday 18 November 2015 18:17:32 Andy Shevchenko wrote:
> On Wed, Nov 18, 2015 at 5:45 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Wednesday 18 November 2015 17:29:19 Andy Shevchenko wrote:
> >> For me it clearly looks like a platform (HW / SW) configuration issue.
> >
> > I think some people have argued in the past that we should always use
> > the same type for dma_addr_t, resource_size_t and phys_addr_t. That
> > would certainly fix the problem you describe as well. In practice,
> > everyone has that already, and my patch by itself fixes all the
> > cases where the FIFO is at a high address and dma_addr_t is already
> > 64-bit wide.
>
> Let me summarize.
>
> We have to have classification by address space
> 1) physical
> 2) virtual
That classification is oversimplified, as the DMA address space
is often not the same as physical.
> Therefore
> resource_addr_t must be equal to phys_addr_t since it may carry any
> possible physical address.
Right, in theory it can also be larger than phys_addr_t, but there is no
need for that.
> dma_addr_t is a physical address wrt DMA mask.
>
> Correct?
dma_addr_t is how a device sees RAM, it is limited by the DMA mask
that is a subset of the capabilities of the device and the buses
through which it is connected, and is subject to IOMMU translation
and possible platform or bus specific offsets from the physical
memory. I still don't know where you're getting with this.
Arnd
next prev parent reply other threads:[~2015-11-18 16:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 14:14 [PATCH] mmc: dw_mmc: use resource_size_t to store physical address Arnd Bergmann
2015-11-13 1:10 ` Andy Shevchenko
2015-11-13 9:35 ` Arnd Bergmann
2015-11-18 0:13 ` Jaehoon Chung
2015-11-18 9:35 ` Andy Shevchenko
2015-11-18 12:38 ` Arnd Bergmann
2015-11-18 15:29 ` Andy Shevchenko
2015-11-18 15:45 ` Arnd Bergmann
2015-11-18 16:17 ` Andy Shevchenko
2015-11-18 16:22 ` Arnd Bergmann [this message]
2015-11-18 18:10 ` Andy Shevchenko
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=6347082.461jehYssD@wuerfel \
--to=arnd@arndb.de \
--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).