ion: Use dma_free_attrs for freeing secure memory

Secure CMA memory is allocated using DMA_ATTR_NO_KERNEL_MAPPING.
Free the memory with the same attribute.

Change-Id: I67289af68763c5b6d4b0f3d828174ad28b711642
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

staging: ion: remove struct ion_page_pool_item

The page pool uses an internal data structure, ion_page_pool_item, for
wrapping pooled pages and constructing a list. As the struct page
already provides ways for doing exactly the same thing, we do not need
to reinvent the wheel. This commit removes the data structure and slab
allocations for it.

Change-Id: I3653a71337abc26c0cd6791be7cb175055281036
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
Reviewed-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 38c003b113ceab37f80d020999d3ec2cbf784da3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

staging: ion: shrink highmem pages on kswapd

ION system heap keeps pages in its pool for better performance. When the
system is under memory pressure, slab shrinker calls the callback
registered and then the pages pooled get freed.

When the shrinker is called, it checks gfp_mask and determines whether
the pages from highmem need to be freed or the pages from lowmem.
Usually, slab shrinker is invoked on kswapd context which gfp_mask is
always GFP_KERNEL, so only lowmem pages are released on kswapd context.
This means that highmem pages in the pool are never reclaimed until
direct reclaim occurs. This can be problematic when the page pool holds
excessive amounts of highmem.

For now, the shrinker callback cannot know exactly which zone should be
targeted for reclamation, as enough information are not passed to. Thus,
it makes sense to shrink both lowmem and highmem zone on kswapd context.

Change-Id: Ibf21e36e6d370967fa9166d6e5d66aec98851478
Reported-by: Wonseo Choi <wonseo.choi@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
Reviewed-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 0cd2dc4db3ba23ff8ab38b8ae81b126626f795d5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
[shashim@codeaurora.org: resolve trivial merge conflict]
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>