aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2014-02-07 03:17:43 -0500
committerVineet Gupta <vgupta@synopsys.com>2014-03-26 05:01:28 -0400
commitec7ac6afd07b2d958aab9dfc0a686300b856922a (patch)
treea4705a35138437a44c8dc99939e36cfda4d34473 /arch/arc
parentd6579e99bc448a351279cea7469ab64a00d25ff8 (diff)
ARC: switch to generic ENTRY/END assembler annotations
With commit 9df62f054406 "arch: use ASM_NL instead of ';'" the generic macros can handle the arch specific newline quirk. Hence we can get rid of ARC asm macros and use the "C" style macros. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/include/asm/linkage.h14
-rw-r--r--arch/arc/kernel/ctx_sw_asm.S2
-rw-r--r--arch/arc/kernel/entry.S52
-rw-r--r--arch/arc/lib/memcmp.S6
-rw-r--r--arch/arc/lib/memcpy-700.S6
-rw-r--r--arch/arc/lib/memset.S10
-rw-r--r--arch/arc/lib/strchr-700.S6
-rw-r--r--arch/arc/lib/strcmp.S6
-rw-r--r--arch/arc/lib/strcpy-700.S6
-rw-r--r--arch/arc/lib/strlen.S6
-rw-r--r--arch/arc/mm/tlbex.S10
11 files changed, 54 insertions, 70 deletions
diff --git a/arch/arc/include/asm/linkage.h b/arch/arc/include/asm/linkage.h
index 66ee5527aefc..5faad17118b4 100644
--- a/arch/arc/include/asm/linkage.h
+++ b/arch/arc/include/asm/linkage.h
@@ -13,20 +13,6 @@
13 13
14#define ASM_NL ` /* use '`' to mark new line in macro */ 14#define ASM_NL ` /* use '`' to mark new line in macro */
15 15
16/* Can't use the ENTRY macro in linux/linkage.h
17 * gas considers ';' as comment vs. newline
18 */
19.macro ARC_ENTRY name
20 .global \name
21 .align 4
22 \name:
23.endm
24
25.macro ARC_EXIT name
26#define ASM_PREV_SYM_ADDR(name) .-##name
27 .size \ name, ASM_PREV_SYM_ADDR(\name)
28.endm
29
30/* annotation for data we want in DCCM - if enabled in .config */ 16/* annotation for data we want in DCCM - if enabled in .config */
31.macro ARCFP_DATA nm 17.macro ARCFP_DATA nm
32#ifdef CONFIG_ARC_HAS_DCCM 18#ifdef CONFIG_ARC_HAS_DCCM
diff --git a/arch/arc/kernel/ctx_sw_asm.S b/arch/arc/kernel/ctx_sw_asm.S
index 65690e7fcc8c..2ff0347a2fd7 100644
--- a/arch/arc/kernel/ctx_sw_asm.S
+++ b/arch/arc/kernel/ctx_sw_asm.S
@@ -62,4 +62,4 @@ __switch_to:
62 ld.ab blink, [sp, 4] 62 ld.ab blink, [sp, 4]
63 j [blink] 63 j [blink]
64 64
65ARC_EXIT __switch_to 65END(__switch_to)
diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S
index 47d09d07f093..819dd5f7eb05 100644
--- a/arch/arc/kernel/entry.S
+++ b/arch/arc/kernel/entry.S
@@ -141,7 +141,7 @@ VECTOR EV_Extension ; 0x130, Extn Intruction Excp (0x26)
141VECTOR reserved ; Reserved Exceptions 141VECTOR reserved ; Reserved Exceptions
142.endr 142.endr
143 143
144#include <linux/linkage.h> /* ARC_{EXTRY,EXIT} */ 144#include <linux/linkage.h> /* {EXTRY,EXIT} */
145#include <asm/entry.h> /* SAVE_ALL_{INT1,INT2,SYS...} */ 145#include <asm/entry.h> /* SAVE_ALL_{INT1,INT2,SYS...} */
146#include <asm/errno.h> 146#include <asm/errno.h>
147#include <asm/arcregs.h> 147#include <asm/arcregs.h>
@@ -184,7 +184,7 @@ reserved: ; processor restart
184; --------------------------------------------- 184; ---------------------------------------------
185; Level 2 ISR: Can interrupt a Level 1 ISR 185; Level 2 ISR: Can interrupt a Level 1 ISR
186; --------------------------------------------- 186; ---------------------------------------------
187ARC_ENTRY handle_interrupt_level2 187ENTRY(handle_interrupt_level2)
188 188
189 ; TODO-vineetg for SMP this wont work 189 ; TODO-vineetg for SMP this wont work
190 ; free up r9 as scratchpad 190 ; free up r9 as scratchpad
@@ -225,14 +225,14 @@ ARC_ENTRY handle_interrupt_level2
225 225
226 b ret_from_exception 226 b ret_from_exception
227 227
228ARC_EXIT handle_interrupt_level2 228END(handle_interrupt_level2)
229 229
230#endif 230#endif
231 231
232; --------------------------------------------- 232; ---------------------------------------------
233; Level 1 ISR 233; Level 1 ISR
234; --------------------------------------------- 234; ---------------------------------------------
235ARC_ENTRY handle_interrupt_level1 235ENTRY(handle_interrupt_level1)
236 236
237 /* free up r9 as scratchpad */ 237 /* free up r9 as scratchpad */
238#ifdef CONFIG_SMP 238#ifdef CONFIG_SMP
@@ -265,7 +265,7 @@ ARC_ENTRY handle_interrupt_level1
265 sr r8, [AUX_IRQ_LV12] ; clear bit in Sticky Status Reg 265 sr r8, [AUX_IRQ_LV12] ; clear bit in Sticky Status Reg
266 266
267 b ret_from_exception 267 b ret_from_exception
268ARC_EXIT handle_interrupt_level1 268END(handle_interrupt_level1)
269 269
270;################### Non TLB Exception Handling ############################# 270;################### Non TLB Exception Handling #############################
271 271
@@ -273,7 +273,7 @@ ARC_EXIT handle_interrupt_level1
273; Instruction Error Exception Handler 273; Instruction Error Exception Handler
274; --------------------------------------------- 274; ---------------------------------------------
275 275
276ARC_ENTRY instr_service 276ENTRY(instr_service)
277 277
278 EXCEPTION_PROLOGUE 278 EXCEPTION_PROLOGUE
279 279
@@ -284,13 +284,13 @@ ARC_ENTRY instr_service
284 284
285 bl do_insterror_or_kprobe 285 bl do_insterror_or_kprobe
286 b ret_from_exception 286 b ret_from_exception
287ARC_EXIT instr_service 287END(instr_service)
288 288
289; --------------------------------------------- 289; ---------------------------------------------
290; Memory Error Exception Handler 290; Memory Error Exception Handler
291; --------------------------------------------- 291; ---------------------------------------------
292 292
293ARC_ENTRY mem_service 293ENTRY(mem_service)
294 294
295 EXCEPTION_PROLOGUE 295 EXCEPTION_PROLOGUE
296 296
@@ -301,13 +301,13 @@ ARC_ENTRY mem_service
301 301
302 bl do_memory_error 302 bl do_memory_error
303 b ret_from_exception 303 b ret_from_exception
304ARC_EXIT mem_service 304END(mem_service)
305 305
306; --------------------------------------------- 306; ---------------------------------------------
307; Machine Check Exception Handler 307; Machine Check Exception Handler
308; --------------------------------------------- 308; ---------------------------------------------
309 309
310ARC_ENTRY EV_MachineCheck 310ENTRY(EV_MachineCheck)
311 311
312 EXCEPTION_PROLOGUE 312 EXCEPTION_PROLOGUE
313 313
@@ -331,13 +331,13 @@ ARC_ENTRY EV_MachineCheck
331 331
332 j do_machine_check_fault 332 j do_machine_check_fault
333 333
334ARC_EXIT EV_MachineCheck 334END(EV_MachineCheck)
335 335
336; --------------------------------------------- 336; ---------------------------------------------
337; Protection Violation Exception Handler 337; Protection Violation Exception Handler
338; --------------------------------------------- 338; ---------------------------------------------
339 339
340ARC_ENTRY EV_TLBProtV 340ENTRY(EV_TLBProtV)
341 341
342 EXCEPTION_PROLOGUE 342 EXCEPTION_PROLOGUE
343 343
@@ -385,12 +385,12 @@ ARC_ENTRY EV_TLBProtV
385 385
386 b ret_from_exception 386 b ret_from_exception
387 387
388ARC_EXIT EV_TLBProtV 388END(EV_TLBProtV)
389 389
390; --------------------------------------------- 390; ---------------------------------------------
391; Privilege Violation Exception Handler 391; Privilege Violation Exception Handler
392; --------------------------------------------- 392; ---------------------------------------------
393ARC_ENTRY EV_PrivilegeV 393ENTRY(EV_PrivilegeV)
394 394
395 EXCEPTION_PROLOGUE 395 EXCEPTION_PROLOGUE
396 396
@@ -401,12 +401,12 @@ ARC_ENTRY EV_PrivilegeV
401 401
402 bl do_privilege_fault 402 bl do_privilege_fault
403 b ret_from_exception 403 b ret_from_exception
404ARC_EXIT EV_PrivilegeV 404END(EV_PrivilegeV)
405 405
406; --------------------------------------------- 406; ---------------------------------------------
407; Extension Instruction Exception Handler 407; Extension Instruction Exception Handler
408; --------------------------------------------- 408; ---------------------------------------------
409ARC_ENTRY EV_Extension 409ENTRY(EV_Extension)
410 410
411 EXCEPTION_PROLOGUE 411 EXCEPTION_PROLOGUE
412 412
@@ -417,7 +417,7 @@ ARC_ENTRY EV_Extension
417 417
418 bl do_extension_fault 418 bl do_extension_fault
419 b ret_from_exception 419 b ret_from_exception
420ARC_EXIT EV_Extension 420END(EV_Extension)
421 421
422;######################### System Call Tracing ######################### 422;######################### System Call Tracing #########################
423 423
@@ -504,7 +504,7 @@ trap_with_param:
504; (2) Break Points 504; (2) Break Points
505;------------------------------------------------------------------ 505;------------------------------------------------------------------
506 506
507ARC_ENTRY EV_Trap 507ENTRY(EV_Trap)
508 508
509 EXCEPTION_PROLOGUE 509 EXCEPTION_PROLOGUE
510 510
@@ -534,9 +534,9 @@ ARC_ENTRY EV_Trap
534 jl [r9] ; Entry into Sys Call Handler 534 jl [r9] ; Entry into Sys Call Handler
535 535
536 ; fall through to ret_from_system_call 536 ; fall through to ret_from_system_call
537ARC_EXIT EV_Trap 537END(EV_Trap)
538 538
539ARC_ENTRY ret_from_system_call 539ENTRY(ret_from_system_call)
540 540
541 st r0, [sp, PT_r0] ; sys call return value in pt_regs 541 st r0, [sp, PT_r0] ; sys call return value in pt_regs
542 542
@@ -546,7 +546,7 @@ ARC_ENTRY ret_from_system_call
546; 546;
547; If ret to user mode do we need to handle signals, schedule() et al. 547; If ret to user mode do we need to handle signals, schedule() et al.
548 548
549ARC_ENTRY ret_from_exception 549ENTRY(ret_from_exception)
550 550
551 ; Pre-{IRQ,Trap,Exception} K/U mode from pt_regs->status32 551 ; Pre-{IRQ,Trap,Exception} K/U mode from pt_regs->status32
552 ld r8, [sp, PT_status32] ; returning to User/Kernel Mode 552 ld r8, [sp, PT_status32] ; returning to User/Kernel Mode
@@ -726,9 +726,9 @@ not_level1_interrupt:
726debug_marker_syscall: 726debug_marker_syscall:
727 rtie 727 rtie
728 728
729ARC_EXIT ret_from_exception 729END(ret_from_exception)
730 730
731ARC_ENTRY ret_from_fork 731ENTRY(ret_from_fork)
732 ; when the forked child comes here from the __switch_to function 732 ; when the forked child comes here from the __switch_to function
733 ; r0 has the last task pointer. 733 ; r0 has the last task pointer.
734 ; put last task in scheduler queue 734 ; put last task in scheduler queue
@@ -745,11 +745,11 @@ ARC_ENTRY ret_from_fork
745 ; special case of kernel_thread entry point returning back due to 745 ; special case of kernel_thread entry point returning back due to
746 ; kernel_execve() - pretend return from syscall to ret to userland 746 ; kernel_execve() - pretend return from syscall to ret to userland
747 b ret_from_exception 747 b ret_from_exception
748ARC_EXIT ret_from_fork 748END(ret_from_fork)
749 749
750;################### Special Sys Call Wrappers ########################## 750;################### Special Sys Call Wrappers ##########################
751 751
752ARC_ENTRY sys_clone_wrapper 752ENTRY(sys_clone_wrapper)
753 SAVE_CALLEE_SAVED_USER 753 SAVE_CALLEE_SAVED_USER
754 bl @sys_clone 754 bl @sys_clone
755 DISCARD_CALLEE_SAVED_USER 755 DISCARD_CALLEE_SAVED_USER
@@ -759,7 +759,7 @@ ARC_ENTRY sys_clone_wrapper
759 bnz tracesys_exit 759 bnz tracesys_exit
760 760
761 b ret_from_system_call 761 b ret_from_system_call
762ARC_EXIT sys_clone_wrapper 762END(sys_clone_wrapper)
763 763
764#ifdef CONFIG_ARC_DW2_UNWIND 764#ifdef CONFIG_ARC_DW2_UNWIND
765; Workaround for bug 94179 (STAR ): 765; Workaround for bug 94179 (STAR ):
diff --git a/arch/arc/lib/memcmp.S b/arch/arc/lib/memcmp.S
index bc813d55b6c3..978bf8314dfb 100644
--- a/arch/arc/lib/memcmp.S
+++ b/arch/arc/lib/memcmp.S
@@ -6,7 +6,7 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9#include <asm/linkage.h> 9#include <linux/linkage.h>
10 10
11#ifdef __LITTLE_ENDIAN__ 11#ifdef __LITTLE_ENDIAN__
12#define WORD2 r2 12#define WORD2 r2
@@ -16,7 +16,7 @@
16#define SHIFT r2 16#define SHIFT r2
17#endif 17#endif
18 18
19ARC_ENTRY memcmp 19ENTRY(memcmp)
20 or r12,r0,r1 20 or r12,r0,r1
21 asl_s r12,r12,30 21 asl_s r12,r12,30
22 sub r3,r2,1 22 sub r3,r2,1
@@ -121,4 +121,4 @@ ARC_ENTRY memcmp
121.Lnil: 121.Lnil:
122 j_s.d [blink] 122 j_s.d [blink]
123 mov r0,0 123 mov r0,0
124ARC_EXIT memcmp 124END(memcmp)
diff --git a/arch/arc/lib/memcpy-700.S b/arch/arc/lib/memcpy-700.S
index b64cc10ac918..3222573e50de 100644
--- a/arch/arc/lib/memcpy-700.S
+++ b/arch/arc/lib/memcpy-700.S
@@ -6,9 +6,9 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9#include <asm/linkage.h> 9#include <linux/linkage.h>
10 10
11ARC_ENTRY memcpy 11ENTRY(memcpy)
12 or r3,r0,r1 12 or r3,r0,r1
13 asl_s r3,r3,30 13 asl_s r3,r3,30
14 mov_s r5,r0 14 mov_s r5,r0
@@ -63,4 +63,4 @@ ARC_ENTRY memcpy
63.Lendbloop: 63.Lendbloop:
64 j_s.d [blink] 64 j_s.d [blink]
65 stb r12,[r5,0] 65 stb r12,[r5,0]
66ARC_EXIT memcpy 66END(memcpy)
diff --git a/arch/arc/lib/memset.S b/arch/arc/lib/memset.S
index 9b2d88d2e141..d36bd43fc98d 100644
--- a/arch/arc/lib/memset.S
+++ b/arch/arc/lib/memset.S
@@ -6,11 +6,11 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9#include <asm/linkage.h> 9#include <linux/linkage.h>
10 10
11#define SMALL 7 /* Must be at least 6 to deal with alignment/loop issues. */ 11#define SMALL 7 /* Must be at least 6 to deal with alignment/loop issues. */
12 12
13ARC_ENTRY memset 13ENTRY(memset)
14 mov_s r4,r0 14 mov_s r4,r0
15 or r12,r0,r2 15 or r12,r0,r2
16 bmsk.f r12,r12,1 16 bmsk.f r12,r12,1
@@ -46,14 +46,14 @@ ARC_ENTRY memset
46 stb.ab r1,[r4,1] 46 stb.ab r1,[r4,1]
47.Ltiny_end: 47.Ltiny_end:
48 j_s [blink] 48 j_s [blink]
49ARC_EXIT memset 49END(memset)
50 50
51; memzero: @r0 = mem, @r1 = size_t 51; memzero: @r0 = mem, @r1 = size_t
52; memset: @r0 = mem, @r1 = char, @r2 = size_t 52; memset: @r0 = mem, @r1 = char, @r2 = size_t
53 53
54ARC_ENTRY memzero 54ENTRY(memzero)
55 ; adjust bzero args to memset args 55 ; adjust bzero args to memset args
56 mov r2, r1 56 mov r2, r1
57 mov r1, 0 57 mov r1, 0
58 b memset ;tail call so need to tinker with blink 58 b memset ;tail call so need to tinker with blink
59ARC_EXIT memzero 59END(memzero)
diff --git a/arch/arc/lib/strchr-700.S b/arch/arc/lib/strchr-700.S
index 9c548c7cf001..b725d5862107 100644
--- a/arch/arc/lib/strchr-700.S
+++ b/arch/arc/lib/strchr-700.S
@@ -11,9 +11,9 @@
11 presence of the norm instruction makes it easier to operate on whole 11 presence of the norm instruction makes it easier to operate on whole
12 words branch-free. */ 12 words branch-free. */
13 13
14#include <asm/linkage.h> 14#include <linux/linkage.h>
15 15
16ARC_ENTRY strchr 16ENTRY(strchr)
17 extb_s r1,r1 17 extb_s r1,r1
18 asl r5,r1,8 18 asl r5,r1,8
19 bmsk r2,r0,1 19 bmsk r2,r0,1
@@ -130,4 +130,4 @@ ARC_ENTRY strchr
130 j_s.d [blink] 130 j_s.d [blink]
131 mov.mi r0,0 131 mov.mi r0,0
132#endif /* ENDIAN */ 132#endif /* ENDIAN */
133ARC_EXIT strchr 133END(strchr)
diff --git a/arch/arc/lib/strcmp.S b/arch/arc/lib/strcmp.S
index 5dc802b45cf3..3544600fefe6 100644
--- a/arch/arc/lib/strcmp.S
+++ b/arch/arc/lib/strcmp.S
@@ -13,9 +13,9 @@
13 source 1; however, that would increase the overhead for loop setup / finish, 13 source 1; however, that would increase the overhead for loop setup / finish,
14 and strcmp might often terminate early. */ 14 and strcmp might often terminate early. */
15 15
16#include <asm/linkage.h> 16#include <linux/linkage.h>
17 17
18ARC_ENTRY strcmp 18ENTRY(strcmp)
19 or r2,r0,r1 19 or r2,r0,r1
20 bmsk_s r2,r2,1 20 bmsk_s r2,r2,1
21 brne r2,0,.Lcharloop 21 brne r2,0,.Lcharloop
@@ -93,4 +93,4 @@ ARC_ENTRY strcmp
93.Lcmpend: 93.Lcmpend:
94 j_s.d [blink] 94 j_s.d [blink]
95 sub r0,r2,r3 95 sub r0,r2,r3
96ARC_EXIT strcmp 96END(strcmp)
diff --git a/arch/arc/lib/strcpy-700.S b/arch/arc/lib/strcpy-700.S
index b7ca4ae81d88..8422f38e1218 100644
--- a/arch/arc/lib/strcpy-700.S
+++ b/arch/arc/lib/strcpy-700.S
@@ -16,9 +16,9 @@
16 there, but the it is not likely to be taken often, and it 16 there, but the it is not likely to be taken often, and it
17 would also be likey to cost an unaligned mispredict at the next call. */ 17 would also be likey to cost an unaligned mispredict at the next call. */
18 18
19#include <asm/linkage.h> 19#include <linux/linkage.h>
20 20
21ARC_ENTRY strcpy 21ENTRY(strcpy)
22 or r2,r0,r1 22 or r2,r0,r1
23 bmsk_s r2,r2,1 23 bmsk_s r2,r2,1
24 brne.d r2,0,charloop 24 brne.d r2,0,charloop
@@ -67,4 +67,4 @@ charloop:
67 brne.d r3,0,charloop 67 brne.d r3,0,charloop
68 stb.ab r3,[r10,1] 68 stb.ab r3,[r10,1]
69 j [blink] 69 j [blink]
70ARC_EXIT strcpy 70END(strcpy)
diff --git a/arch/arc/lib/strlen.S b/arch/arc/lib/strlen.S
index 39759e099696..53cfd5685a5f 100644
--- a/arch/arc/lib/strlen.S
+++ b/arch/arc/lib/strlen.S
@@ -6,9 +6,9 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9#include <asm/linkage.h> 9#include <linux/linkage.h>
10 10
11ARC_ENTRY strlen 11ENTRY(strlen)
12 or r3,r0,7 12 or r3,r0,7
13 ld r2,[r3,-7] 13 ld r2,[r3,-7]
14 ld.a r6,[r3,-3] 14 ld.a r6,[r3,-3]
@@ -80,4 +80,4 @@ ARC_ENTRY strlen
80.Learly_end: 80.Learly_end:
81 b.d .Lend 81 b.d .Lend
82 sub_s.ne r1,r1,r1 82 sub_s.ne r1,r1,r1
83ARC_EXIT strlen 83END(strlen)
diff --git a/arch/arc/mm/tlbex.S b/arch/arc/mm/tlbex.S
index 3fcfdb38d242..79bfc81358c9 100644
--- a/arch/arc/mm/tlbex.S
+++ b/arch/arc/mm/tlbex.S
@@ -260,7 +260,7 @@ ARCFP_CODE ;Fast Path Code, candidate for ICCM
260; I-TLB Miss Exception Handler 260; I-TLB Miss Exception Handler
261;----------------------------------------------------------------------------- 261;-----------------------------------------------------------------------------
262 262
263ARC_ENTRY EV_TLBMissI 263ENTRY(EV_TLBMissI)
264 264
265 TLBMISS_FREEUP_REGS 265 TLBMISS_FREEUP_REGS
266 266
@@ -293,13 +293,13 @@ ARC_ENTRY EV_TLBMissI
293 TLBMISS_RESTORE_REGS 293 TLBMISS_RESTORE_REGS
294 rtie 294 rtie
295 295
296ARC_EXIT EV_TLBMissI 296END(EV_TLBMissI)
297 297
298;----------------------------------------------------------------------------- 298;-----------------------------------------------------------------------------
299; D-TLB Miss Exception Handler 299; D-TLB Miss Exception Handler
300;----------------------------------------------------------------------------- 300;-----------------------------------------------------------------------------
301 301
302ARC_ENTRY EV_TLBMissD 302ENTRY(EV_TLBMissD)
303 303
304 TLBMISS_FREEUP_REGS 304 TLBMISS_FREEUP_REGS
305 305
@@ -381,6 +381,4 @@ do_slow_path_pf:
381 bl do_page_fault 381 bl do_page_fault
382 b ret_from_exception 382 b ret_from_exception
383 383
384ARC_EXIT EV_TLBMissD 384END(EV_TLBMissD)
385
386ARC_ENTRY EV_TLBMissB ; Bogus entry to measure sz of DTLBMiss hdlr