mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
powerpc/64e: Fix obtool warnings in exceptions-64e.S
Since commit aec0ba7472 ("powerpc/64: Use -mprofile-kernel for big
endian ELFv2 kernels"), this file is checked by objtool. Fix warnings
such as:
arch/powerpc/kernel/idle_64e.o: warning: objtool: .text+0x20: unannotated intra-function call
arch/powerpc/kernel/exceptions-64e.o: warning: objtool: .text+0x218: unannotated intra-function call
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230622112451.735268-1-mpe@ellerman.id.au
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2007 Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp.
|
* Copyright (C) 2007 Ben. Herrenschmidt (benh@kernel.crashing.org), IBM Corp.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/linkage.h>
|
||||||
#include <linux/threads.h>
|
#include <linux/threads.h>
|
||||||
#include <asm/reg.h>
|
#include <asm/reg.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
#define SPECIAL_EXC_LOAD(reg, name) \
|
#define SPECIAL_EXC_LOAD(reg, name) \
|
||||||
ld reg, (SPECIAL_EXC_##name * 8 + SPECIAL_EXC_FRAME_OFFS)(r1)
|
ld reg, (SPECIAL_EXC_##name * 8 + SPECIAL_EXC_FRAME_OFFS)(r1)
|
||||||
|
|
||||||
special_reg_save:
|
SYM_CODE_START_LOCAL(special_reg_save)
|
||||||
/*
|
/*
|
||||||
* We only need (or have stack space) to save this stuff if
|
* We only need (or have stack space) to save this stuff if
|
||||||
* we interrupted the kernel.
|
* we interrupted the kernel.
|
||||||
@@ -131,8 +132,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
|
|||||||
SPECIAL_EXC_STORE(r10,CSRR1)
|
SPECIAL_EXC_STORE(r10,CSRR1)
|
||||||
|
|
||||||
blr
|
blr
|
||||||
|
SYM_CODE_END(special_reg_save)
|
||||||
|
|
||||||
ret_from_level_except:
|
SYM_CODE_START_LOCAL(ret_from_level_except)
|
||||||
ld r3,_MSR(r1)
|
ld r3,_MSR(r1)
|
||||||
andi. r3,r3,MSR_PR
|
andi. r3,r3,MSR_PR
|
||||||
beq 1f
|
beq 1f
|
||||||
@@ -206,6 +208,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
|
|||||||
mtxer r11
|
mtxer r11
|
||||||
|
|
||||||
blr
|
blr
|
||||||
|
SYM_CODE_END(ret_from_level_except)
|
||||||
|
|
||||||
.macro ret_from_level srr0 srr1 paca_ex scratch
|
.macro ret_from_level srr0 srr1 paca_ex scratch
|
||||||
bl ret_from_level_except
|
bl ret_from_level_except
|
||||||
@@ -232,13 +235,15 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
|
|||||||
mfspr r13,\scratch
|
mfspr r13,\scratch
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
ret_from_crit_except:
|
SYM_CODE_START_LOCAL(ret_from_crit_except)
|
||||||
ret_from_level SPRN_CSRR0 SPRN_CSRR1 PACA_EXCRIT SPRN_SPRG_CRIT_SCRATCH
|
ret_from_level SPRN_CSRR0 SPRN_CSRR1 PACA_EXCRIT SPRN_SPRG_CRIT_SCRATCH
|
||||||
rfci
|
rfci
|
||||||
|
SYM_CODE_END(ret_from_crit_except)
|
||||||
|
|
||||||
ret_from_mc_except:
|
SYM_CODE_START_LOCAL(ret_from_mc_except)
|
||||||
ret_from_level SPRN_MCSRR0 SPRN_MCSRR1 PACA_EXMC SPRN_SPRG_MC_SCRATCH
|
ret_from_level SPRN_MCSRR0 SPRN_MCSRR1 PACA_EXMC SPRN_SPRG_MC_SCRATCH
|
||||||
rfmci
|
rfmci
|
||||||
|
SYM_CODE_END(ret_from_mc_except)
|
||||||
|
|
||||||
/* Exception prolog code for all exceptions */
|
/* Exception prolog code for all exceptions */
|
||||||
#define EXCEPTION_PROLOG(n, intnum, type, addition) \
|
#define EXCEPTION_PROLOG(n, intnum, type, addition) \
|
||||||
@@ -978,20 +983,22 @@ masked_interrupt_book3e_0x2c0:
|
|||||||
* r14 and r15 containing the fault address and error code, with the
|
* r14 and r15 containing the fault address and error code, with the
|
||||||
* original values stashed away in the PACA
|
* original values stashed away in the PACA
|
||||||
*/
|
*/
|
||||||
storage_fault_common:
|
SYM_CODE_START_LOCAL(storage_fault_common)
|
||||||
addi r3,r1,STACK_INT_FRAME_REGS
|
addi r3,r1,STACK_INT_FRAME_REGS
|
||||||
bl do_page_fault
|
bl do_page_fault
|
||||||
b interrupt_return
|
b interrupt_return
|
||||||
|
SYM_CODE_END(storage_fault_common)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Alignment exception doesn't fit entirely in the 0x100 bytes so it
|
* Alignment exception doesn't fit entirely in the 0x100 bytes so it
|
||||||
* continues here.
|
* continues here.
|
||||||
*/
|
*/
|
||||||
alignment_more:
|
SYM_CODE_START_LOCAL(alignment_more)
|
||||||
addi r3,r1,STACK_INT_FRAME_REGS
|
addi r3,r1,STACK_INT_FRAME_REGS
|
||||||
bl alignment_exception
|
bl alignment_exception
|
||||||
REST_NVGPRS(r1)
|
REST_NVGPRS(r1)
|
||||||
b interrupt_return
|
b interrupt_return
|
||||||
|
SYM_CODE_END(alignment_more)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Trampolines used when spotting a bad kernel stack pointer in
|
* Trampolines used when spotting a bad kernel stack pointer in
|
||||||
@@ -1030,8 +1037,7 @@ BAD_STACK_TRAMPOLINE(0xe00)
|
|||||||
BAD_STACK_TRAMPOLINE(0xf00)
|
BAD_STACK_TRAMPOLINE(0xf00)
|
||||||
BAD_STACK_TRAMPOLINE(0xf20)
|
BAD_STACK_TRAMPOLINE(0xf20)
|
||||||
|
|
||||||
.globl bad_stack_book3e
|
_GLOBAL(bad_stack_book3e)
|
||||||
bad_stack_book3e:
|
|
||||||
/* XXX: Needs to make SPRN_SPRG_GEN depend on exception type */
|
/* XXX: Needs to make SPRN_SPRG_GEN depend on exception type */
|
||||||
mfspr r10,SPRN_SRR0; /* read SRR0 before touching stack */
|
mfspr r10,SPRN_SRR0; /* read SRR0 before touching stack */
|
||||||
ld r1,PACAEMERGSP(r13)
|
ld r1,PACAEMERGSP(r13)
|
||||||
@@ -1285,8 +1291,7 @@ have_hes:
|
|||||||
* ever takes any parameters, the SCOM code must also be updated to
|
* ever takes any parameters, the SCOM code must also be updated to
|
||||||
* provide them.
|
* provide them.
|
||||||
*/
|
*/
|
||||||
.globl a2_tlbinit_code_start
|
_GLOBAL(a2_tlbinit_code_start)
|
||||||
a2_tlbinit_code_start:
|
|
||||||
|
|
||||||
ori r11,r3,MAS0_WQ_ALLWAYS
|
ori r11,r3,MAS0_WQ_ALLWAYS
|
||||||
oris r11,r11,MAS0_ESEL(3)@h /* Use way 3: workaround A2 erratum 376 */
|
oris r11,r11,MAS0_ESEL(3)@h /* Use way 3: workaround A2 erratum 376 */
|
||||||
@@ -1479,8 +1484,7 @@ _GLOBAL(book3e_secondary_thread_init)
|
|||||||
mflr r28
|
mflr r28
|
||||||
b 3b
|
b 3b
|
||||||
|
|
||||||
.globl init_core_book3e
|
_GLOBAL(init_core_book3e)
|
||||||
init_core_book3e:
|
|
||||||
/* Establish the interrupt vector base */
|
/* Establish the interrupt vector base */
|
||||||
tovirt(r2,r2)
|
tovirt(r2,r2)
|
||||||
LOAD_REG_ADDR(r3, interrupt_base_book3e)
|
LOAD_REG_ADDR(r3, interrupt_base_book3e)
|
||||||
@@ -1488,7 +1492,7 @@ init_core_book3e:
|
|||||||
sync
|
sync
|
||||||
blr
|
blr
|
||||||
|
|
||||||
init_thread_book3e:
|
SYM_CODE_START_LOCAL(init_thread_book3e)
|
||||||
lis r3,(SPRN_EPCR_ICM | SPRN_EPCR_GICM)@h
|
lis r3,(SPRN_EPCR_ICM | SPRN_EPCR_GICM)@h
|
||||||
mtspr SPRN_EPCR,r3
|
mtspr SPRN_EPCR,r3
|
||||||
|
|
||||||
@@ -1502,6 +1506,7 @@ init_thread_book3e:
|
|||||||
mtspr SPRN_TSR,r3
|
mtspr SPRN_TSR,r3
|
||||||
|
|
||||||
blr
|
blr
|
||||||
|
SYM_CODE_END(init_thread_book3e)
|
||||||
|
|
||||||
_GLOBAL(__setup_base_ivors)
|
_GLOBAL(__setup_base_ivors)
|
||||||
SET_IVOR(0, 0x020) /* Critical Input */
|
SET_IVOR(0, 0x020) /* Critical Input */
|
||||||
|
|||||||
Reference in New Issue
Block a user