mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: <torvalds@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>,
	James Hogan <james.hogan@imgtec.com>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Mike Frysinger <vapier@gentoo.org>,
	<uclinux-dist-devel@blackfin.uclinux.org>
Subject: [PATCH] linkage.h: fix build breakage due to symbol prefix handling
Date: Wed, 1 May 2013 22:04:17 +0100	[thread overview]
Message-ID: <1367442257-7897-1-git-send-email-james.hogan@imgtec.com> (raw)

Al's commit e1b5bb6d1236d4ad2084c53aa83dde7cdf6f8eea ("consolidate
cond_syscall and SYSCALL_ALIAS declarations") broke the build on
blackfin and metag due to the following code:

  #ifndef SYMBOL_NAME
  #ifdef CONFIG_SYMBOL_PREFIX
  #define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x
  #else
  #define SYMBOL_NAME(x) x
  #endif
  #endif
  #define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x))

__stringify literally stringifies CONFIG_SYMBOL_PREFIX ##x, so you get
lines like this in kernel/sys_ni.s:

  .weak CONFIG_SYMBOL_PREFIXsys_quotactl
  .set CONFIG_SYMBOL_PREFIXsys_quotactl,CONFIG_SYMBOL_PREFIXsys_ni_syscall

The patches in Rusty's modules-next tree such as "CONFIG_SYMBOL_PREFIX:
cleanup." clean up the whole mess around symbol prefixes, so this patch
just attempts to fix the build in the mean time. The intermediate
definition of SYMBOL_NAME above isn't used and is incorrect when
CONFIG_SYMBOL_PREFIX is defined as CONFIG_SYMBOL_PREFIX is a quoted
string literal, so define __SYMBOL_NAME directly depending on
CONFIG_SYMBOL_PREFIX.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
---
 include/linux/linkage.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 829d66c..de09dec 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -15,14 +15,11 @@
 #define asmlinkage CPP_ASMLINKAGE
 #endif
 
-#ifndef SYMBOL_NAME
 #ifdef CONFIG_SYMBOL_PREFIX
-#define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x
+#define __SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX __stringify(x)
 #else
-#define SYMBOL_NAME(x) x
+#define __SYMBOL_NAME(x) __stringify(x)
 #endif
-#endif
-#define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x))
 
 #ifndef cond_syscall
 #define cond_syscall(x) asm(".weak\t" __SYMBOL_NAME(x) \
-- 
1.8.1.2



             reply	other threads:[~2013-05-01 21:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 21:04 James Hogan [this message]
2013-05-01 21:43 ` Al Viro
2013-05-01 22:12   ` James Hogan
2013-05-02  3:42   ` Al Viro
2013-05-02  0:28 ` Rusty Russell
2013-05-02  3:37   ` Stephen Rothwell
2013-05-02  5:30     ` Stephen Rothwell
2013-05-06  5:29       ` Rusty Russell
2013-05-08  1:10         ` Stephen Rothwell

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=1367442257-7897-1-git-send-email-james.hogan@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@linux-foundation.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.org \
    --cc=viro@zeniv.linux.org.uk \
    /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®