diff options
-rw-r--r-- | arch/powerpc/include/asm/ftrace.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/linkage.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/ppc_asm.h | 22 |
3 files changed, 26 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h index 169d039ed402..e3661872fbea 100644 --- a/arch/powerpc/include/asm/ftrace.h +++ b/arch/powerpc/include/asm/ftrace.h | |||
@@ -61,6 +61,7 @@ struct dyn_arch_ftrace { | |||
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) && !defined(__ASSEMBLY__) | 63 | #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) && !defined(__ASSEMBLY__) |
64 | #if !defined(_CALL_ELF) || _CALL_ELF != 2 | ||
64 | #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME | 65 | #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME |
65 | static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) | 66 | static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) |
66 | { | 67 | { |
@@ -72,6 +73,7 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name | |||
72 | */ | 73 | */ |
73 | return !strcmp(sym + 4, name + 3); | 74 | return !strcmp(sym + 4, name + 3); |
74 | } | 75 | } |
76 | #endif | ||
75 | #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 && !__ASSEMBLY__ */ | 77 | #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 && !__ASSEMBLY__ */ |
76 | 78 | ||
77 | #endif /* _ASM_POWERPC_FTRACE */ | 79 | #endif /* _ASM_POWERPC_FTRACE */ |
diff --git a/arch/powerpc/include/asm/linkage.h b/arch/powerpc/include/asm/linkage.h index b36f650a13ff..e3ad5c72724a 100644 --- a/arch/powerpc/include/asm/linkage.h +++ b/arch/powerpc/include/asm/linkage.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_POWERPC_LINKAGE_H | 2 | #define _ASM_POWERPC_LINKAGE_H |
3 | 3 | ||
4 | #ifdef CONFIG_PPC64 | 4 | #ifdef CONFIG_PPC64 |
5 | #if !defined(_CALL_ELF) || _CALL_ELF != 2 | ||
5 | #define cond_syscall(x) \ | 6 | #define cond_syscall(x) \ |
6 | asm ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n" \ | 7 | asm ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n" \ |
7 | "\t.weak ." #x "\n\t.set ." #x ", .sys_ni_syscall\n") | 8 | "\t.weak ." #x "\n\t.set ." #x ", .sys_ni_syscall\n") |
@@ -9,5 +10,6 @@ | |||
9 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ | 10 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ |
10 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) | 11 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) |
11 | #endif | 12 | #endif |
13 | #endif | ||
12 | 14 | ||
13 | #endif /* _ASM_POWERPC_LINKAGE_H */ | 15 | #endif /* _ASM_POWERPC_LINKAGE_H */ |
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 61992d8f99df..5394d41a7140 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h | |||
@@ -192,6 +192,26 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR) | |||
192 | #define __STK_PARAM(i) (48 + ((i)-3)*8) | 192 | #define __STK_PARAM(i) (48 + ((i)-3)*8) |
193 | #define STK_PARAM(i) __STK_PARAM(__REG_##i) | 193 | #define STK_PARAM(i) __STK_PARAM(__REG_##i) |
194 | 194 | ||
195 | #if defined(_CALL_ELF) && _CALL_ELF == 2 | ||
196 | |||
197 | #define _GLOBAL(name) \ | ||
198 | .section ".text"; \ | ||
199 | .align 2 ; \ | ||
200 | .type name,@function; \ | ||
201 | .globl name; \ | ||
202 | name: | ||
203 | |||
204 | #define _KPROBE(name) \ | ||
205 | .section ".kprobes.text","a"; \ | ||
206 | .align 2 ; \ | ||
207 | .type name,@function; \ | ||
208 | .globl name; \ | ||
209 | name: | ||
210 | |||
211 | #define DOTSYM(a) a | ||
212 | |||
213 | #else | ||
214 | |||
195 | #define XGLUE(a,b) a##b | 215 | #define XGLUE(a,b) a##b |
196 | #define GLUE(a,b) XGLUE(a,b) | 216 | #define GLUE(a,b) XGLUE(a,b) |
197 | 217 | ||
@@ -225,6 +245,8 @@ GLUE(.,name): | |||
225 | 245 | ||
226 | #define DOTSYM(a) GLUE(.,a) | 246 | #define DOTSYM(a) GLUE(.,a) |
227 | 247 | ||
248 | #endif | ||
249 | |||
228 | #else /* 32-bit */ | 250 | #else /* 32-bit */ |
229 | 251 | ||
230 | #define _ENTRY(n) \ | 252 | #define _ENTRY(n) \ |