#include <linux/kmemleak.h>
#include <linux/memory_hotplug.h>
+#ifdef CONFIG_AMLOGIC_VMAP
+#include <linux/amlogic/vmap_stack.h>
+#endif
+
/*
* Kmemleak configuration and common defines.
*/
read_lock(&tasklist_lock);
do_each_thread(g, p) {
+#ifdef CONFIG_AMLOGIC_VMAP
+ void *stack = aml_task_stack(p);
+ if (stack)
+ scan_block(stack, stack + THREAD_SIZE, NULL);
+#else
void *stack = try_get_task_stack(p);
if (stack) {
scan_block(stack, stack + THREAD_SIZE, NULL);
put_task_stack(p);
}
+#endif
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
}