55 * Copyright (C) 2007 Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp.
66 */
77
8+ #include <linux/linkage.h>
89#include <linux/threads.h>
910#include <asm/reg.h>
1011#include <asm/page.h>
6667#define SPECIAL_EXC_LOAD(reg, name) \
6768 ld reg, (SPECIAL_EXC_##name * 8 + SPECIAL_EXC_FRAME_OFFS)(r1)
6869
69- special_reg_save:
70+ SYM_CODE_START_ LOCAL ( special_reg_save)
7071 /*
7172 * We only need (or have stack space) to save this stuff if
7273 * we interrupted the kernel.
@@ -131,8 +132,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
131132 SPECIAL_EXC_STORE(r10,CSRR1)
132133
133134 blr
135+ SYM_CODE_END(special_reg_save)
134136
135- ret_from_level_except:
137+ SYM_CODE_START_ LOCAL ( ret_from_level_except)
136138 ld r3,_MSR(r1)
137139 andi. r3,r3,MSR_PR
138140 beq 1f
@@ -206,6 +208,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
206208 mtxer r11
207209
208210 blr
211+ SYM_CODE_END(ret_from_level_except)
209212
210213.macro ret_from_level srr0 srr1 paca_ex scratch
211214 bl ret_from_level_except
@@ -232,13 +235,15 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
232235 mfspr r13,\scratch
233236.endm
234237
235- ret_from_crit_except:
238+ SYM_CODE_START_ LOCAL ( ret_from_crit_except)
236239 ret_from_level SPRN_CSRR0 SPRN_CSRR1 PACA_EXCRIT SPRN_SPRG_CRIT_SCRATCH
237240 rfci
241+ SYM_CODE_END(ret_from_crit_except)
238242
239- ret_from_mc_except:
243+ SYM_CODE_START_ LOCAL ( ret_from_mc_except)
240244 ret_from_level SPRN_MCSRR0 SPRN_MCSRR1 PACA_EXMC SPRN_SPRG_MC_SCRATCH
241245 rfmci
246+ SYM_CODE_END(ret_from_mc_except)
242247
243248/* Exception prolog code for all exceptions */
244249#define EXCEPTION_PROLOG(n, intnum, type, addition) \
@@ -978,20 +983,22 @@ masked_interrupt_book3e_0x2c0:
978983 * r14 and r15 containing the fault address and error code, with the
979984 * original values stashed away in the PACA
980985 */
981- storage_fault_common:
986+ SYM_CODE_START_ LOCAL ( storage_fault_common)
982987 addi r3,r1,STACK_INT_FRAME_REGS
983988 bl do_page_fault
984989 b interrupt_return
990+ SYM_CODE_END(storage_fault_common)
985991
986992/*
987993 * Alignment exception doesn't fit entirely in the 0x100 bytes so it
988994 * continues here.
989995 */
990- alignment_more:
996+ SYM_CODE_START_ LOCAL ( alignment_more)
991997 addi r3,r1,STACK_INT_FRAME_REGS
992998 bl alignment_exception
993999 REST_NVGPRS(r1)
9941000 b interrupt_return
1001+ SYM_CODE_END(alignment_more)
9951002
9961003/*
9971004 * Trampolines used when spotting a bad kernel stack pointer in
@@ -1030,8 +1037,7 @@ BAD_STACK_TRAMPOLINE(0xe00)
10301037BAD_STACK_TRAMPOLINE(0xf00 )
10311038BAD_STACK_TRAMPOLINE(0xf20 )
10321039
1033- .globl bad_stack_book3e
1034- bad_stack_book3e:
1040+ _GLOBAL(bad_stack_book3e)
10351041 /* XXX: Needs to make SPRN_SPRG_GEN depend on exception type */
10361042 mfspr r10,SPRN_SRR0; /* read SRR0 before touching stack */
10371043 ld r1,PACAEMERGSP(r13)
@@ -1285,8 +1291,7 @@ have_hes:
12851291 * ever takes any parameters, the SCOM code must also be updated to
12861292 * provide them.
12871293 */
1288- .globl a2_tlbinit_code_start
1289- a2_tlbinit_code_start:
1294+ _GLOBAL(a2_tlbinit_code_start)
12901295
12911296 ori r11,r3,MAS0_WQ_ALLWAYS
12921297 oris r11,r11,MAS0_ESEL(3 )@h /* Use way 3: workaround A2 erratum 376 */
@@ -1479,16 +1484,15 @@ _GLOBAL(book3e_secondary_thread_init)
14791484 mflr r28
14801485 b 3b
14811486
1482- .globl init_core_book3e
1483- init_core_book3e:
1487+ _GLOBAL(init_core_book3e)
14841488 /* Establish the interrupt vector base */
14851489 tovirt(r2,r2)
14861490 LOAD_REG_ADDR(r3, interrupt_base_book3e)
14871491 mtspr SPRN_IVPR,r3
14881492 sync
14891493 blr
14901494
1491- init_thread_book3e:
1495+ SYM_CODE_START_ LOCAL ( init_thread_book3e)
14921496 lis r3,(SPRN_EPCR_ICM | SPRN_EPCR_GICM)@h
14931497 mtspr SPRN_EPCR,r3
14941498
@@ -1502,6 +1506,7 @@ init_thread_book3e:
15021506 mtspr SPRN_TSR,r3
15031507
15041508 blr
1509+ SYM_CODE_END(init_thread_book3e)
15051510
15061511_GLOBAL(__setup_base_ivors)
15071512 SET_IVOR(0 , 0x020 ) /* Critical Input */
0 commit comments