Loading drivers/staging/android/ion/ion_cma_heap.c +12 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ * Copyright (C) Linaro 2012 * Author: <benjamin.gaignard@linaro.org> for ST-Ericsson. * * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and Loading Loading @@ -214,6 +214,9 @@ static int ion_secure_cma_allocate( { int ret; if (!(flags & ION_FLAGS_CP_MASK)) return -EINVAL; ret = ion_cma_allocate(heap, buffer, len, flags); if (ret) { dev_err(heap->priv, "Unable to allocate cma buffer"); Loading @@ -221,8 +224,14 @@ static int ion_secure_cma_allocate( } ret = ion_hyp_assign_sg_from_flags(buffer->sg_table, flags, true); if (ret) if (ret) { if (ret == -EADDRNOTAVAIL) { goto out_free_buf; } else { ion_cma_free(buffer); goto out; } } return ret; Loading drivers/staging/android/ion/ion_secure_util.c +4 −1 Original line number Diff line number Diff line /* * * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -87,6 +87,9 @@ static int populate_vm_list(unsigned long flags, unsigned int *vm_list, int vmid; flags = flags & ION_FLAGS_CP_MASK; if (!flags) return -EINVAL; for_each_set_bit(itr, &flags, BITS_PER_LONG) { vmid = get_vmid(0x1UL << itr); if (vmid < 0 || !nelems) Loading Loading
drivers/staging/android/ion/ion_cma_heap.c +12 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ * Copyright (C) Linaro 2012 * Author: <benjamin.gaignard@linaro.org> for ST-Ericsson. * * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and Loading Loading @@ -214,6 +214,9 @@ static int ion_secure_cma_allocate( { int ret; if (!(flags & ION_FLAGS_CP_MASK)) return -EINVAL; ret = ion_cma_allocate(heap, buffer, len, flags); if (ret) { dev_err(heap->priv, "Unable to allocate cma buffer"); Loading @@ -221,8 +224,14 @@ static int ion_secure_cma_allocate( } ret = ion_hyp_assign_sg_from_flags(buffer->sg_table, flags, true); if (ret) if (ret) { if (ret == -EADDRNOTAVAIL) { goto out_free_buf; } else { ion_cma_free(buffer); goto out; } } return ret; Loading
drivers/staging/android/ion/ion_secure_util.c +4 −1 Original line number Diff line number Diff line /* * * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -87,6 +87,9 @@ static int populate_vm_list(unsigned long flags, unsigned int *vm_list, int vmid; flags = flags & ION_FLAGS_CP_MASK; if (!flags) return -EINVAL; for_each_set_bit(itr, &flags, BITS_PER_LONG) { vmid = get_vmid(0x1UL << itr); if (vmid < 0 || !nelems) Loading