*
* This work is licensed under the terms of any of these licenses
* (at your option):
* - GNU GPL, version 2 or later.
* - GNU LGPL, version 2.1 or later.
*
* This work is licensed under the terms of any of these licenses
* (at your option):
* - GNU GPL, version 2 or later.
* - GNU LGPL, version 2.1 or later.
void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed)
{
void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed)
{
flags |= MAP_HUGETLB;
ret = mmap(req, size, prot, flags, -1, 0);
if (ret == MAP_FAILED && (flags & MAP_HUGETLB)) {
flags |= MAP_HUGETLB;
ret = mmap(req, size, prot, flags, -1, 0);
if (ret == MAP_FAILED && (flags & MAP_HUGETLB)) {
flags &= ~MAP_HUGETLB;
ret = mmap(req, size, prot, flags, -1, 0);
}
flags &= ~MAP_HUGETLB;
ret = mmap(req, size, prot, flags, -1, 0);
}