search_free_space: remove POSTK_DEBUG_ARCH_DEP_27 side
search_free_space changed since this was implemented and the code is no longer compatible Looking at it again, the function is not used anywhere other than syscall.c and the second function does not seem to fix anything specific so this just removes the untested side. Change-Id: If28d35ec4da083a40dc6936fcb21f05fb64e378a Fujitsu: POSTK_DEBUG_ARCH_DEP_27
This commit is contained in:
committed by
Dominique Martinet
parent
a5c3e48843
commit
0994c3300e
@@ -59,9 +59,6 @@
|
||||
#include <rusage_private.h>
|
||||
#include <ihk/monitor.h>
|
||||
#include <profile.h>
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_27
|
||||
#include <memory.h>
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_27 */
|
||||
|
||||
/* Headers taken from kitten LWK */
|
||||
#include <lwk/stddef.h>
|
||||
@@ -1288,8 +1285,6 @@ int do_munmap(void *addr, size_t len)
|
||||
return error;
|
||||
}
|
||||
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_27
|
||||
#else
|
||||
static int search_free_space(size_t len, int pgshift, intptr_t *addrp)
|
||||
{
|
||||
struct thread *thread = cpu_local_var(current);
|
||||
@@ -1330,7 +1325,6 @@ out:
|
||||
__FUNCTION__, len, pgshift, addr);
|
||||
return error;
|
||||
}
|
||||
#endif
|
||||
|
||||
intptr_t
|
||||
do_mmap(const intptr_t addr0, const size_t len0, const int prot,
|
||||
@@ -1423,12 +1417,7 @@ do_mmap(const intptr_t addr0, const size_t len0, const int prot,
|
||||
}
|
||||
else {
|
||||
/* Obtain mapping address */
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_27
|
||||
error = search_free_space(cpu_local_var(current), len,
|
||||
region->map_end, PAGE_SHIFT + p2align, &addr);
|
||||
#else
|
||||
error = search_free_space(len, PAGE_SHIFT + p2align, &addr);
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_27 */
|
||||
if (error) {
|
||||
ekprintf("do_mmap:search_free_space(%lx,%lx,%d) failed. %d\n",
|
||||
len, region->map_end, p2align, error);
|
||||
@@ -4983,12 +4972,7 @@ SYSCALL_DECLARE(shmat)
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_27
|
||||
error = search_free_space(cpu_local_var(current), len,
|
||||
region->map_end, obj->pgshift, &addr);
|
||||
#else
|
||||
error = search_free_space(len, obj->pgshift, &addr);
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_27 */
|
||||
if (error) {
|
||||
ihk_mc_spinlock_unlock_noirq(&vm->memory_range_lock);
|
||||
shmobj_list_unlock();
|
||||
@@ -7822,14 +7806,8 @@ SYSCALL_DECLARE(mremap)
|
||||
goto out;
|
||||
}
|
||||
need_relocate = 1;
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_27
|
||||
error = search_free_space(cpu_local_var(current), newsize,
|
||||
vm->region.map_end,
|
||||
range->pgshift, (intptr_t *)&newstart);
|
||||
#else
|
||||
error = search_free_space(newsize, range->pgshift,
|
||||
(intptr_t *)&newstart);
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_27 */
|
||||
if (error) {
|
||||
ekprintf("sys_mremap(%#lx,%#lx,%#lx,%#x,%#lx):"
|
||||
"search failed. %d\n",
|
||||
|
||||
Reference in New Issue
Block a user