staging: android: ion: Use CMA APIs directly
authorLaura Abbott <labbott@redhat.com>
Tue, 18 Apr 2017 18:27:05 +0000 (11:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Apr 2017 18:41:12 +0000 (20:41 +0200)
commit204f672255c228ef7a66c29ae48123778da938a1
tree038f782b7abb1290f34fad60659e9dede9d681ad
parente4231bcda72daef497af45e195a33daa0f9357d0
staging: android: ion: Use CMA APIs directly

When CMA was first introduced, its primary use was for DMA allocation
and the only way to get CMA memory was to call dma_alloc_coherent. This
put Ion in an awkward position since there was no device structure
readily available and setting one up messed up the coherency model.
These days, CMA can be allocated directly from the APIs. Switch to using
this model to avoid needing a dummy device. This also mitigates some of
the caching problems (e.g. dma_alloc_coherent only returning uncached
memory).

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/Kconfig
drivers/staging/android/ion/Makefile
drivers/staging/android/ion/ion_cma_heap.c
drivers/staging/android/ion/ion_heap.c