x86_64 has 2 x arch_vma_name() - can we drop one?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux