5
5
* Copyright (C) 2007 Ben. Herrenschmidt ([email protected] ), IBM Corp.
6
6
*/
7
7
8
+ #include <linux/linkage.h>
8
9
#include <linux/threads.h>
9
10
#include <asm/reg.h>
10
11
#include <asm/page.h>
66
67
#define SPECIAL_EXC_LOAD(reg, name) \
67
68
ld reg, (SPECIAL_EXC_##name * 8 + SPECIAL_EXC_FRAME_OFFS)(r1)
68
69
69
- special_reg_save:
70
+ SYM_CODE_START_ LOCAL ( special_reg_save)
70
71
/*
71
72
* We only need (or have stack space) to save this stuff if
72
73
* we interrupted the kernel.
@@ -131,8 +132,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
131
132
SPECIAL_EXC_STORE(r10,CSRR1)
132
133
133
134
blr
135
+ SYM_CODE_END(special_reg_save)
134
136
135
- ret_from_level_except:
137
+ SYM_CODE_START_ LOCAL ( ret_from_level_except)
136
138
ld r3,_MSR(r1)
137
139
andi. r3,r3,MSR_PR
138
140
beq 1f
@@ -206,6 +208,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
206
208
mtxer r11
207
209
208
210
blr
211
+ SYM_CODE_END(ret_from_level_except)
209
212
210
213
.macro ret_from_level srr0 srr1 paca_ex scratch
211
214
bl ret_from_level_except
@@ -232,13 +235,15 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
232
235
mfspr r13,\scratch
233
236
.endm
234
237
235
- ret_from_crit_except:
238
+ SYM_CODE_START_ LOCAL ( ret_from_crit_except)
236
239
ret_from_level SPRN_CSRR0 SPRN_CSRR1 PACA_EXCRIT SPRN_SPRG_CRIT_SCRATCH
237
240
rfci
241
+ SYM_CODE_END(ret_from_crit_except)
238
242
239
- ret_from_mc_except:
243
+ SYM_CODE_START_ LOCAL ( ret_from_mc_except)
240
244
ret_from_level SPRN_MCSRR0 SPRN_MCSRR1 PACA_EXMC SPRN_SPRG_MC_SCRATCH
241
245
rfmci
246
+ SYM_CODE_END(ret_from_mc_except)
242
247
243
248
/* Exception prolog code for all exceptions */
244
249
#define EXCEPTION_PROLOG(n, intnum, type, addition) \
@@ -978,20 +983,22 @@ masked_interrupt_book3e_0x2c0:
978
983
* r14 and r15 containing the fault address and error code, with the
979
984
* original values stashed away in the PACA
980
985
*/
981
- storage_fault_common:
986
+ SYM_CODE_START_ LOCAL ( storage_fault_common)
982
987
addi r3,r1,STACK_INT_FRAME_REGS
983
988
bl do_page_fault
984
989
b interrupt_return
990
+ SYM_CODE_END(storage_fault_common)
985
991
986
992
/*
987
993
* Alignment exception doesn't fit entirely in the 0x100 bytes so it
988
994
* continues here.
989
995
*/
990
- alignment_more:
996
+ SYM_CODE_START_ LOCAL ( alignment_more)
991
997
addi r3,r1,STACK_INT_FRAME_REGS
992
998
bl alignment_exception
993
999
REST_NVGPRS(r1)
994
1000
b interrupt_return
1001
+ SYM_CODE_END(alignment_more)
995
1002
996
1003
/*
997
1004
* Trampolines used when spotting a bad kernel stack pointer in
@@ -1030,8 +1037,7 @@ BAD_STACK_TRAMPOLINE(0xe00)
1030
1037
BAD_STACK_TRAMPOLINE(0xf00 )
1031
1038
BAD_STACK_TRAMPOLINE(0xf20 )
1032
1039
1033
- .globl bad_stack_book3e
1034
- bad_stack_book3e:
1040
+ _GLOBAL(bad_stack_book3e)
1035
1041
/* XXX: Needs to make SPRN_SPRG_GEN depend on exception type */
1036
1042
mfspr r10,SPRN_SRR0; /* read SRR0 before touching stack */
1037
1043
ld r1,PACAEMERGSP(r13)
@@ -1285,8 +1291,7 @@ have_hes:
1285
1291
* ever takes any parameters, the SCOM code must also be updated to
1286
1292
* provide them.
1287
1293
*/
1288
- .globl a2_tlbinit_code_start
1289
- a2_tlbinit_code_start:
1294
+ _GLOBAL(a2_tlbinit_code_start)
1290
1295
1291
1296
ori r11,r3,MAS0_WQ_ALLWAYS
1292
1297
oris r11,r11,MAS0_ESEL(3 )@h /* Use way 3: workaround A2 erratum 376 */
@@ -1479,16 +1484,15 @@ _GLOBAL(book3e_secondary_thread_init)
1479
1484
mflr r28
1480
1485
b 3b
1481
1486
1482
- .globl init_core_book3e
1483
- init_core_book3e:
1487
+ _GLOBAL(init_core_book3e)
1484
1488
/* Establish the interrupt vector base */
1485
1489
tovirt(r2,r2)
1486
1490
LOAD_REG_ADDR(r3, interrupt_base_book3e)
1487
1491
mtspr SPRN_IVPR,r3
1488
1492
sync
1489
1493
blr
1490
1494
1491
- init_thread_book3e:
1495
+ SYM_CODE_START_ LOCAL ( init_thread_book3e)
1492
1496
lis r3,(SPRN_EPCR_ICM | SPRN_EPCR_GICM)@h
1493
1497
mtspr SPRN_EPCR,r3
1494
1498
@@ -1502,6 +1506,7 @@ init_thread_book3e:
1502
1506
mtspr SPRN_TSR,r3
1503
1507
1504
1508
blr
1509
+ SYM_CODE_END(init_thread_book3e)
1505
1510
1506
1511
_GLOBAL(__setup_base_ivors)
1507
1512
SET_IVOR(0 , 0x020 ) /* Critical Input */
0 commit comments