summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorEtienne Carriere <etienne.carriere@linaro.org>2017-08-24 15:44:46 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitd67f14488bd0e24c0ac6db8e0a87e939df41fd70 (patch)
tree2d5682cb8b91ea5ec68859e9999af5699f3fc54b /drivers/staging
parent77485dbbbcb330de65afa87acb1f754befc8f013 (diff)
ion: fix unmapped heap test settings **not for mainline**
If one enables ION_DUMMY_UNMAPPED_HEAP without providing the target unmapped heap configuration settings (physical base address and size), the kernel cannot build. This situation occurs in Linux test build cases, i.e running the allmodconfig configuration. This change overcomes the issue by providing default null settings for both ION_DUMMY_UNMAPPED_BASE and ION_DUMMY_UNMAPPED_SIZE. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> (cherry picked from commit ac0c2c26b9819c5e95d56cb2d8937de0357eecaa linaro repo https://github.com/linaro-swg/linux.git tag optee-v4.9-20171005)
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/android/ion/Kconfig2
-rw-r--r--drivers/staging/android/ion/ion_dummy_driver.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/Kconfig b/drivers/staging/android/ion/Kconfig
index 4c2631604be3..821871ddf678 100644
--- a/drivers/staging/android/ion/Kconfig
+++ b/drivers/staging/android/ion/Kconfig
@@ -71,6 +71,7 @@ config ION_DUMMY_UNMAPPED_HEAP
config ION_DUMMY_UNMAPPED_BASE
hex "Physical base address of the ION unmapped heap"
depends on ION_DUMMY_UNMAPPED_HEAP
+ default 0
help
Allows one the statically define an unmapped heap from the
ION dummy driver to exercice unamped heaps buffer managment.
@@ -78,6 +79,7 @@ config ION_DUMMY_UNMAPPED_BASE
config ION_DUMMY_UNMAPPED_SIZE
hex "Physical byte size of the ION unmapped heap"
depends on ION_DUMMY_UNMAPPED_HEAP
+ default 0
help
Allows one the statically define an unmapped heap from the
ION dummy driver to exercice unamped heaps buffer managment.
diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
index c39009a2edd1..504c379ab036 100644
--- a/drivers/staging/android/ion/ion_dummy_driver.c
+++ b/drivers/staging/android/ion/ion_dummy_driver.c
@@ -56,7 +56,7 @@ static struct ion_platform_heap dummy_heaps[] = {
.align = SZ_16K,
.priv = (void *)(SZ_16K),
},
-#ifdef CONFIG_ION_DUMMY_UNMAPPED_HEAP
+#if defined(CONFIG_ION_DUMMY_UNMAPPED_HEAP) && CONFIG_ION_DUMMY_UNMAPPED_SIZE
{
.id = ION_HEAP_TYPE_UNMAPPED,
.type = ION_HEAP_TYPE_UNMAPPED,