From: Arnd Bergmann <arnd@arndb.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Jaehoon Chung <jh80.chung@samsung.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] mmc: dw_mmc: use resource_size_t to store physical address
Date: Wed, 18 Nov 2015 16:45:23 +0100 [thread overview]
Message-ID: <7083277.bjzG62aVmx@wuerfel> (raw)
In-Reply-To: <CAHp75VfE2DWYB5GwSe1WLPb+gTnhNpYz5qo7jNfMK4tXbEWioQ@mail.gmail.com>
On Wednesday 18 November 2015 17:29:19 Andy Shevchenko wrote:
>
> I understand most of the things here, what I don't is how a platform
> is supposed to work if you have the following:
> a) HW, that uses register space let's say higher than 32-bit;
> b) DMA engine, which should provide a DMA capability for above HW block;
> c) dma_addr_t which does not cover the HW register space.
On this platform, the current code is obviously broken, because the pointer
is 32-bit wide and cannot reach the registers. I assume you agree on that
part.
With my patch, the 64-bit resource_size_t in dw_mci helps get the
correct FIFO address to this line:
cfg.dst_addr = host->phy_regs + fifo_offset;
There, it remains broken because of the dma_addr_t being too short, and
we also need Linus' patch from https://lkml.org/lkml/2013/4/26/120 in
addition to mine.
> 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.
> In case of bounce buffers I can't understand how it helps there.
Right, bounce buffers are irrelevant here, because the FIFO address
is never translated and never bounced.
Arnd
next prev parent reply other threads:[~2015-11-18 15:46 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 [this message]
2015-11-18 16:17 ` Andy Shevchenko
2015-11-18 16:22 ` Arnd Bergmann
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=7083277.bjzG62aVmx@wuerfel \
--to=arnd@arndb.de \
--cc=andy.shevchenko@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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