lkml.org 
[lkml]   [2013]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] linkage.h: fix build breakage due to symbol prefix handling
Date
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Version from today's merge fix. Rusty, you should show this to Linus
> when you ask him to merge your modules tree (assuming it looks right :-)).
>
> From: Stephen Rothwell <sfr@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 <sfr@canb.auug.org.au>

I ended up with something similar, except I didn't remove
linux/stringify.h from the includes.

Thanks!
Rusty.

> ---
> include/linux/linkage.h | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/linkage.h b/include/linux/linkage.h
> index de09dec..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,21 +15,16 @@
> #define asmlinkage CPP_ASMLINKAGE
> #endif
>
> -#ifdef CONFIG_SYMBOL_PREFIX
> -#define __SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX __stringify(x)
> -#else
> -#define __SYMBOL_NAME(x) __stringify(x)
> -#endif
> -
> #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)
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au


\
 
 \ /
  Last update: 2013-05-06 10:21    [W:0.037 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site