mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-28 21:46:02 -04:00
drivers: cma: represent physical addresses as phys_addr_t
This commit changes the CMA early initialization code to use phys_addr_t for representing physical addresses instead of unsigned long. Without this change, among other things, dma_declare_contiguous() simply discards any memory regions whose address is not representable as unsigned long. This is a problem on 32-bit PAE machines where unsigned long is 32-bit but physical address space is larger. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Cyril Chemparathy <cyril@ti.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
This commit is contained in:
committed by
Marek Szyprowski
parent
387870f2d6
commit
4009793e15
@@ -68,7 +68,7 @@ struct device;
|
||||
extern struct cma *dma_contiguous_default_area;
|
||||
|
||||
void dma_contiguous_reserve(phys_addr_t addr_limit);
|
||||
int dma_declare_contiguous(struct device *dev, unsigned long size,
|
||||
int dma_declare_contiguous(struct device *dev, phys_addr_t size,
|
||||
phys_addr_t base, phys_addr_t limit);
|
||||
|
||||
struct page *dma_alloc_from_contiguous(struct device *dev, int count,
|
||||
@@ -83,7 +83,7 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages,
|
||||
static inline void dma_contiguous_reserve(phys_addr_t limit) { }
|
||||
|
||||
static inline
|
||||
int dma_declare_contiguous(struct device *dev, unsigned long size,
|
||||
int dma_declare_contiguous(struct device *dev, phys_addr_t size,
|
||||
phys_addr_t base, phys_addr_t limit)
|
||||
{
|
||||
return -ENOSYS;
|
||||
|
||||
Reference in New Issue
Block a user