arm: dma-mapping: set proper bits for mapping

Set the size of bitmap area properly to ensure the proper iova address
to be returned by the bitmap_() API's through alloc_iova(). The current
implementation causes the bitmap index search out of bounds of a page
which can lead to the randomn corruption issues, and also causes wrong
iova free in free_iova() which can lead to map twice issue.

Fixes: I7cdeecca599 (arm: dma-mapping: Fix broken iommu attach and detach)
Change-Id: I5f82c424f9cda32ddc7e3b9b4e9ceff36bc55d80
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
1 file changed