From c1f29a61af906fe737e25159ea05691ce7d23305 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalenko Date: Mon, 6 Jun 2011 11:07:30 +0400 Subject: [PATCH] Fixed debug in driver; remove some cache_flushes --- driver/debug.h | 2 +- driver/us_proc_inst.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/driver/debug.h b/driver/debug.h index 54b1f53..e1590f0 100644 --- a/driver/debug.h +++ b/driver/debug.h @@ -21,7 +21,7 @@ #include #include // strrchr -// #undef __DEBUG +#undef __DEBUG #ifdef __DEBUG #define DPRINTF(format, args...) do { \ diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index 9547268..bc01097 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -439,8 +439,9 @@ static int install_mapped_ips (struct task_struct *task, inst_us_proc_t* task_in if (addr < vma->vm_start) addr += vma->vm_start; } - flush_cache_all(); #ifdef BOARD_tegra + flush_cache_all(); + // Andreev S. hack if ( addr < CONFIG_PAGE_OFFSET ) { #endif @@ -471,7 +472,7 @@ static int install_mapped_ips (struct task_struct *task, inst_us_proc_t* task_in addr = task_inst_info->p_libs[i].p_vtps[k].addr; if (!(vma->vm_flags & VM_EXECUTABLE)) addr += vma->vm_start; - flush_cache_all(); +// flush_cache_all(); if (page_present (mm, addr)) { DPRINTF ("pid %d, %s sym is loaded at %lx/%lx.", task->pid, task_inst_info->p_libs[i].path, task_inst_info->p_libs[i].p_ips[k].offset, addr); @@ -523,7 +524,7 @@ static int uninstall_mapped_ips (struct task_struct *task, inst_us_proc_t* task } task_inst_info->unres_ips_count++; task_inst_info->p_libs[i].p_ips[k].installed = 0; - flush_cache_all(); +// flush_cache_all(); } } for (k = 0; k < task_inst_info->p_libs[i].vtps_count; k++) @@ -533,7 +534,7 @@ static int uninstall_mapped_ips (struct task_struct *task, inst_us_proc_t* task unregister_ujprobe (task, &task_inst_info->p_libs[i].p_vtps[k].jprobe, atomic); task_inst_info->unres_vtps_count++; task_inst_info->p_libs[i].p_vtps[k].installed = 0; - flush_cache_all(); +// flush_cache_all(); } } } -- 2.7.4