lkml.org 
[lkml]   [2007]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectx86_64 has 2 x arch_vma_name() - can we drop one?
In include/linux/mm.h arch_vma_name() is declared __weak.
This hide the fact that x86_64 has 2 implementations of
said function.

In arch/x86_64/mm/init.c:
const char *arch_vma_name(struct vm_area_struct *vma)
{
if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso)
return "[vdso]";
if (vma == &gate_vma)
return "[vsyscall]";
return NULL;
}

And in arch/x86_64/ia32/syscall32.c:
const char *arch_vma_name(struct vm_area_struct *vma)
{
if (vma->vm_start == VSYSCALL32_BASE &&
vma->vm_mm && vma->vm_mm->task_size == IA32_PAGE_OFFSET)
return "[vdso]";
return NULL;
}

As no comment were preceeding the fucntions this seems not to be on
purpose.
If I am correct which one should die?

The reason why this popped up is that the __weak definition in mm.h
causes problems on at least powerpc (trigger a binutils bug).
A similar bug is present at ia64 - but I have not confirmed if the
same fix is needed.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-25 20:35    [W:0.037 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site