Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux/fpc-iii.git] / arch / arc / include / asm / linkage.h
blob66ee5527aefc08d7e5e3af13dbf553ce67d7c6c7
1 /*
2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #ifndef __ASM_LINKAGE_H
10 #define __ASM_LINKAGE_H
12 #ifdef __ASSEMBLY__
14 #define ASM_NL ` /* use '`' to mark new line in macro */
16 /* Can't use the ENTRY macro in linux/linkage.h
17 * gas considers ';' as comment vs. newline
19 .macro ARC_ENTRY name
20 .global \name
21 .align 4
22 \name:
23 .endm
25 .macro ARC_EXIT name
26 #define ASM_PREV_SYM_ADDR(name) .-##name
27 .size \ name, ASM_PREV_SYM_ADDR(\name)
28 .endm
30 /* annotation for data we want in DCCM - if enabled in .config */
31 .macro ARCFP_DATA nm
32 #ifdef CONFIG_ARC_HAS_DCCM
33 .section .data.arcfp
34 #else
35 .section .data
36 #endif
37 .global \nm
38 .endm
40 /* annotation for data we want in DCCM - if enabled in .config */
41 .macro ARCFP_CODE
42 #ifdef CONFIG_ARC_HAS_ICCM
43 .section .text.arcfp, "ax",@progbits
44 #else
45 .section .text, "ax",@progbits
46 #endif
47 .endm
49 #else /* !__ASSEMBLY__ */
51 #ifdef CONFIG_ARC_HAS_ICCM
52 #define __arcfp_code __attribute__((__section__(".text.arcfp")))
53 #else
54 #define __arcfp_code __attribute__((__section__(".text")))
55 #endif
57 #ifdef CONFIG_ARC_HAS_DCCM
58 #define __arcfp_data __attribute__((__section__(".data.arcfp")))
59 #else
60 #define __arcfp_data __attribute__((__section__(".data")))
61 #endif
63 #endif /* __ASSEMBLY__ */
65 #endif