From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756327AbbKRQXZ (ORCPT ); Wed, 18 Nov 2015 11:23:25 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:56595 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756304AbbKRQXV (ORCPT ); Wed, 18 Nov 2015 11:23:21 -0500 From: Arnd Bergmann To: Andy Shevchenko Cc: Ulf Hansson , Jaehoon Chung , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-arm Mailing List Subject: Re: [PATCH] mmc: dw_mmc: use resource_size_t to store physical address Date: Wed, 18 Nov 2015 17:22:47 +0100 Message-ID: <6347082.461jehYssD@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <28102387.ALpaBHpim0@wuerfel> <7083277.bjzG62aVmx@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:NlSfvamdXn0splNlef24LMsi/2kgdl76SDq3jukBuFlGitPTFVw 40JrLnCawqxuQdGuiCNeiRG70WC3htbUjfLpIs0vP8EPGMqIASQc/pZYOHsym3aPgFge6ue eCYHZ+rTOMB3XFrywL8pfrjbUm6kRR9UzVAP/bGFpp+JRqxd4RmpagElLYw8xli2ljv+sZP hSMO5nUVu4+PEyAlNMWAg== X-UI-Out-Filterresults: notjunk:1;V01:K0:DVBijvaeYJ4=:t2IcyPLWUqQeLJGBhpHX0J 0UhsMcQlM1uxHHKTUBnhKWfwiC7UXXfe3IHeBRh0XbQuNKaHY6Fa+SF/0nP8k3KAB5QiijEin hrr3Q/rXT3nZnMS4Z/oRlg4MnBEIQUizca8bC7InZ0e0AlSDd1UpF5c4QmpzOM4PnAnWnAx+8 Ds78Zu6QDPwp4GhMPxOQzKIeGPNi0lDkS5tgwRooE5VYw6Sd1PxBu3VP6XLrSraZWDVAI0nub +u8qYno4FNEecemrz3S8yPPunJzyQ/A5AvZQAhWOMrFRRc5ERAZFg5mayjFaf5UeVZM5hgr12 yhe6DzZsC35Qz+lrIWfDaHMcrFfi841RfHCebIU0w6HGyCLI0sKQSFEvP+yEO+TUnB0/0RT7x HPQNMavnSXYuVj2Cs7cx6WfxFj2WfVQ6wGowzCtwfKVPCt1k8dq4bSzz47j5QDLt/Au/raSWr RL+zO6jbnR3IyswDmf22tNyJ6N9A/1zgdqfMkJfw28JolnKNm5E1UlzmwnBXCpQDYMHukU/To k1Xi0pjsQwjjWhcthuDHRzHytDmwm4lEBtX+nkdIm98iyz8GSpvZMcdNOB3WEVUaaU6PFrbfS Cun284Lc+bA2iO01l13eKfUZTyL/KhQyW2o66UbkRVC9MTC85ngAo9X6p5YVqSIof4ZRCudAE hWVd9qsQfw7F6yPmmrAF/uFB4lTNPdOx29jgKTIdZghhyQY4fFIY20QIi2eNk35kpcwrJBHCy DwaNE/B6VCgrRgqG Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 18 November 2015 18:17:32 Andy Shevchenko wrote: > On Wed, Nov 18, 2015 at 5:45 PM, Arnd Bergmann 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