From: Sam Ravnborg <sam@ravnborg.org>
To: Andi Kleen <ak@suse.de>, LKML <linux-kernel@vger.kernel.org>
Cc: Nathan Lynch <ntl@pobox.com>, Andy Whitcroft <apw@shadowen.org>
Subject: x86_64 has 2 x arch_vma_name() - can we drop one?
Date: Wed, 25 Jul 2007 20:31:32 +0200 [thread overview]
Message-ID: <20070725183132.GA28408@uranus.ravnborg.org> (raw)
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
next reply other threads:[~2007-07-25 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 18:31 Sam Ravnborg [this message]
2007-07-25 20:59 ` Sam Ravnborg
2007-07-25 21:23 ` Roland McGrath
2007-07-25 21:34 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070725183132.GA28408@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=ak@suse.de \
--cc=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ntl@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®