[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070725183132.GA28408@uranus.ravnborg.org>
Date: Wed, 25 Jul 2007 20:31:32 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Andi Kleen <ak@...e.de>, LKML <linux-kernel@...r.kernel.org>
Cc: Nathan Lynch <ntl@...ox.com>, Andy Whitcroft <apw@...dowen.org>
Subject: x86_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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists