]> git.baikalelectronics.ru Git - kernel.git/commit
DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 20 May 2014 22:54:22 +0000 (16:54 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 20 May 2014 22:55:23 +0000 (16:55 -0600)
commit2cb3a0e58803c13e6cb7e7814ec7934a51cfb542
treecf82c612f595bf8296892ca5bfb0672d6d6f6f0f
parentf3d7a367243a956da27b756e746f1d8e2b7e932e
DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t

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 <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: James Bottomley <jbottomley@Parallels.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Documentation/DMA-API.txt
drivers/base/dma-coherent.c
drivers/base/dma-mapping.c
include/asm-generic/dma-coherent.h
include/linux/dma-mapping.h