Hi all,

On Thu, 02 May 2013 09:58:08 +0930 Rusty Russell <ru...@rustcorp.com.au> wrote:
>
> James Hogan <james.ho...@imgtec.com> writes:
> > 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.
> 
> I just pushed my modules-next tree to Linus, so hopefully the nightmare
> is over soon!

This is the merge fix patch I have been carrying in linux-next since
March 14: (this probably does not quite apply any more but, hey ...)

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Thu, 14 Mar 2013 17:14:41 +1100
Subject: [PATCH] cond_syscall and SYSCALL_ALIAS merge fixup

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 include/linux/linkage.h | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 829d66c..bedcddf 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -2,7 +2,7 @@
 #define _LINUX_LINKAGE_H
 
 #include <linux/compiler.h>
-#include <linux/stringify.h>
+#include <linux/export.h>
 #include <asm/linkage.h>
 
 #ifdef __cplusplus
@@ -15,24 +15,16 @@
 #define asmlinkage CPP_ASMLINKAGE
 #endif
 
-#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))
-
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" __SYMBOL_NAME(x) \
-       "\n\t.set\t" __SYMBOL_NAME(x) "," __SYMBOL_NAME(sys_ni_syscall));
+#define cond_syscall(x) asm(".weak\t" VMLINUX_SYMBOL_STR(x) "\n\t"     \
+                           ".set\t" VMLINUX_SYMBOL_STR(x) ","  \
+                           VMLINUX_SYMBOL_STR(sys_ni_syscall))
 #endif
 
 #ifndef SYSCALL_ALIAS
 #define SYSCALL_ALIAS(alias, name)                             \
-       asm ("\t.globl " __SYMBOL_NAME(alias)                   \
-       "\n\t.set\t" __SYMBOL_NAME(alias) "," __SYMBOL_NAME(name))
+       asm ("\t.globl " VMLINUX_SYMBOL_STR(alias)                      \
+       "\n\t.set\t" VMLINUX_SYMBOL_STR(alias) "," VMLINUX_SYMBOL_STR(name))
 #endif
 
 #define __page_aligned_data    __section(.data..page_aligned) 
__aligned(PAGE_SIZE)
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    s...@canb.auug.org.au

Attachment: pgpA1NA_qYpLt.pgp
Description: PGP signature

Reply via email to