Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72871
b: refs/heads/master
c: 885be03
h: refs/heads/master
i:
  72869: ba0566c
  72867: bb57a76
  72863: d024392
v: v3
  • Loading branch information
Robin Getz authored and Bryan Wu committed Oct 29, 2007
1 parent 6fc8719 commit a9a1304
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64307f7db3690140a16c6748e65068f8a279877c
refs/heads/master: 885be03b069131d242506f0f717d38659b2bdb6c
30 changes: 18 additions & 12 deletions trunk/arch/blackfin/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ void __init trap_init(void)
int kstack_depth_to_print = 48;

#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
static int printk_address(unsigned long address)
static void printk_address(unsigned long address)
{
struct vm_list_struct *vml;
struct task_struct *p;
struct mm_struct *mm;
unsigned long offset;
unsigned long flags, offset;
unsigned int in_exception = bfin_read_IPEND() & 0x10;

#ifdef CONFIG_KALLSYMS
unsigned long symsize;
Expand All @@ -75,9 +76,10 @@ static int printk_address(unsigned long address)
/* yeah! kernel space! */
if (!modname)
modname = delim = "";
return printk("<0x%p> { %s%s%s%s + 0x%lx }",
printk("<0x%p> { %s%s%s%s + 0x%lx }",
(void *)address, delim, modname, delim, symname,
(unsigned long)offset);
return;

}
#endif
Expand All @@ -86,9 +88,9 @@ static int printk_address(unsigned long address)
* mappings of all our processes and see if we can't be a whee
* bit more specific
*/
write_lock_irq(&tasklist_lock);
write_lock_irqsave(&tasklist_lock, flags);
for_each_process(p) {
mm = get_task_mm(p);
mm = (in_exception ? p->mm : get_task_mm(p));
if (!mm)
continue;

Expand Down Expand Up @@ -117,20 +119,24 @@ static int printk_address(unsigned long address)
else
offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT);

write_unlock_irq(&tasklist_lock);
mmput(mm);
return printk("<0x%p> [ %s + 0x%lx ]",
(void *)address, name, offset);
printk("<0x%p> [ %s + 0x%lx ]",
(void *)address, name, offset);
if (!in_exception)
mmput(mm);
goto done;
}

vml = vml->next;
}
mmput(mm);
if (!in_exception)
mmput(mm);
}
write_unlock_irq(&tasklist_lock);

/* we were unable to find this address anywhere */
return printk("[<0x%p>]", (void *)address);
printk("[<0x%p>]", (void *)address);

done:
write_unlock_irqrestore(&tasklist_lock, flags);
}
#endif

Expand Down

0 comments on commit a9a1304

Please sign in to comment.