mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* x86_64 has 2 x arch_vma_name() - can we drop one?
@ 2007-07-25 18:31 Sam Ravnborg
  2007-07-25 20:59 ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2007-07-25 18:31 UTC (permalink / raw)
  To: Andi Kleen, LKML; +Cc: Nathan Lynch, Andy Whitcroft

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-25 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 18:31 x86_64 has 2 x arch_vma_name() - can we drop one? Sam Ravnborg
2007-07-25 20:59 ` Sam Ravnborg
2007-07-25 21:23   ` Roland McGrath
2007-07-25 21:34     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®