From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 9 May 2014 04:50:14 +0200 From: Greg Kroah-Hartman To: Bjorn Helgaas Cc: Arnd Bergmann , linux-doc@vger.kernel.org, Joerg Roedel , Randy Dunlap , Liviu Dudau , linux-kernel@vger.kernel.org, James Bottomley , linux-pci@vger.kernel.org, David Woodhouse Subject: Re: [PATCH v3 2/4] DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t Message-ID: <20140509025014.GE21085@kroah.com> References: <20140508204257.17877.4639.stgit@bhelgaas-glaptop.roam.corp.google.com> <20140508204900.17877.3108.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20140508204900.17877.3108.stgit@bhelgaas-glaptop.roam.corp.google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Thu, May 08, 2014 at 02:49:00PM -0600, Bjorn Helgaas wrote: > dma_declare_coherent_memory() takes two addresses for a region of memory: a > "bus_addr" and a "device_addr". I think the intent is that "bus_addr" is > the physical address a *CPU* would use to access the region, and > "device_addr" is the bus address the *device* would use to address the > region. > > Rename "bus_addr" to "phys_addr" and change its type to phys_addr_t. > Most callers already supply a phys_addr_t for this argument. The others > supply a 32-bit integer (a constant, unsigned int, or __u32) and need no > change. > > Use "unsigned long", not phys_addr_t, to hold PFNs. > > No functional change (this could theoretically fix a truncation in a config > with 32-bit dma_addr_t and 64-bit phys_addr_t, but I don't think there are > any such cases involving this code). > > Signed-off-by: Bjorn Helgaas > Acked-by: Arnd Bergmann Acked-by: Greg Kroah-Hartman