diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-07-29 15:18:48 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-10-31 15:49:24 +0100 |
commit | 00c8f1623658947a97345ecb86b71232ff540d0d (patch) | |
tree | da2757c83e836aabfaa677e026ef59b5787b71e9 /drivers/scsi/scsi_lib.c | |
parent | ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounc... (diff) | |
download | linux-00c8f1623658947a97345ecb86b71232ff540d0d.tar.xz linux-00c8f1623658947a97345ecb86b71232ff540d0d.zip |
ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
Most of the kernel assumes that PFN0 is the start of the physical
memory (RAM). This assumptions is not true on most of the ARM SOCs
and hence and if one try to update the ARM port to follow the assumptions,
we end of breaking the dma bounce limit for few block layer drivers.
One such example is trying to unify the meaning of max*_pfn on ARM
as the bootmem layer expects, breaks few block layer driver dma
bounce limit.
To fix this problem, we introduce dma_max_pfn(dev) generic helper with
a possibility of override from the architecture code. The helper converts
a DMA bitmask of bits to a block PFN number. In all the generic cases,
it is just "dev->dma_mask >> PAGE_SHIFT" and hence default behavior
is maintained as is.
Subsequent patches will make use of the helper. No functional change.
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
0 files changed, 0 insertions, 0 deletions