Commit 26a374ae authored by Martin Schwidefsky's avatar Martin Schwidefsky

s390: add missing ENDPROC statements to assembler functions

The assembler code in arch/s390 misses proper ENDPROC statements
to properly end functions in a few places. Add them.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 7a5da02d
...@@ -41,6 +41,7 @@ ENTRY(_diag14_dma) ...@@ -41,6 +41,7 @@ ENTRY(_diag14_dma)
lgfr %r2,%r5 lgfr %r2,%r5
BR_EX_DMA_r14 BR_EX_DMA_r14
EX_TABLE_DMA(.Ldiag14_ex, .Ldiag14_fault) EX_TABLE_DMA(.Ldiag14_ex, .Ldiag14_fault)
ENDPROC(_diag14_dma)
/* /*
* int _diag210_dma(struct diag210 *addr) * int _diag210_dma(struct diag210 *addr)
...@@ -58,6 +59,7 @@ ENTRY(_diag210_dma) ...@@ -58,6 +59,7 @@ ENTRY(_diag210_dma)
lgfr %r2,%r2 lgfr %r2,%r2
BR_EX_DMA_r14 BR_EX_DMA_r14
EX_TABLE_DMA(.Ldiag210_ex, .Ldiag210_fault) EX_TABLE_DMA(.Ldiag210_ex, .Ldiag210_fault)
ENDPROC(_diag210_dma)
/* /*
* int _diag26c_dma(void *req, void *resp, enum diag26c_sc subcode) * int _diag26c_dma(void *req, void *resp, enum diag26c_sc subcode)
...@@ -71,6 +73,7 @@ ENTRY(_diag26c_dma) ...@@ -71,6 +73,7 @@ ENTRY(_diag26c_dma)
lgfr %r2,%r5 lgfr %r2,%r5
BR_EX_DMA_r14 BR_EX_DMA_r14
EX_TABLE_DMA(.Ldiag26c_ex, .Ldiag26c_ex) EX_TABLE_DMA(.Ldiag26c_ex, .Ldiag26c_ex)
ENDPROC(_diag26c_dma)
/* /*
* void _diag0c_dma(struct hypfs_diag0c_entry *entry) * void _diag0c_dma(struct hypfs_diag0c_entry *entry)
...@@ -80,6 +83,7 @@ ENTRY(_diag0c_dma) ...@@ -80,6 +83,7 @@ ENTRY(_diag0c_dma)
diag %r2,%r2,0x0c diag %r2,%r2,0x0c
sam64 sam64
BR_EX_DMA_r14 BR_EX_DMA_r14
ENDPROC(_diag0c_dma)
/* /*
* void _swsusp_reset_dma(void) * void _swsusp_reset_dma(void)
...@@ -96,6 +100,7 @@ restart_entry: ...@@ -96,6 +100,7 @@ restart_entry:
sigp %r1,%r0,SIGP_SET_ARCHITECTURE sigp %r1,%r0,SIGP_SET_ARCHITECTURE
sam64 sam64
BR_EX_DMA_r14 BR_EX_DMA_r14
ENDPROC(_swsusp_reset_dma)
/* /*
* void _diag308_reset_dma(void) * void _diag308_reset_dma(void)
...@@ -142,6 +147,7 @@ restart_part2: ...@@ -142,6 +147,7 @@ restart_part2:
lpswe 0(%r4) lpswe 0(%r4)
.Lcontinue: .Lcontinue:
BR_EX_DMA_r14 BR_EX_DMA_r14
ENDPROC(_diag308_reset_dma)
.section .dma.data,"aw",@progbits .section .dma.data,"aw",@progbits
.align 8 .align 8
......
...@@ -207,5 +207,6 @@ ENTRY(crc32_be_vgfm_16) ...@@ -207,5 +207,6 @@ ENTRY(crc32_be_vgfm_16)
.Ldone: .Ldone:
VLGVF %r2,%v2,3 VLGVF %r2,%v2,3
BR_EX %r14 BR_EX %r14
ENDPROC(crc32_be_vgfm_16)
.previous .previous
...@@ -105,13 +105,14 @@ ...@@ -105,13 +105,14 @@
ENTRY(crc32_le_vgfm_16) ENTRY(crc32_le_vgfm_16)
larl %r5,.Lconstants_CRC_32_LE larl %r5,.Lconstants_CRC_32_LE
j crc32_le_vgfm_generic j crc32_le_vgfm_generic
ENDPROC(crc32_le_vgfm_16)
ENTRY(crc32c_le_vgfm_16) ENTRY(crc32c_le_vgfm_16)
larl %r5,.Lconstants_CRC_32C_LE larl %r5,.Lconstants_CRC_32C_LE
j crc32_le_vgfm_generic j crc32_le_vgfm_generic
ENDPROC(crc32c_le_vgfm_16)
ENTRY(crc32_le_vgfm_generic)
crc32_le_vgfm_generic:
/* Load CRC-32 constants */ /* Load CRC-32 constants */
VLM CONST_PERM_LE2BE,CONST_CRC_POLY,0,%r5 VLM CONST_PERM_LE2BE,CONST_CRC_POLY,0,%r5
...@@ -267,5 +268,6 @@ crc32_le_vgfm_generic: ...@@ -267,5 +268,6 @@ crc32_le_vgfm_generic:
.Ldone: .Ldone:
VLGVF %r2,%v2,2 VLGVF %r2,%v2,2
BR_EX %r14 BR_EX %r14
ENDPROC(crc32_le_vgfm_generic)
.previous .previous
...@@ -28,6 +28,7 @@ ENTRY(s390_base_mcck_handler) ...@@ -28,6 +28,7 @@ ENTRY(s390_base_mcck_handler)
1: la %r1,4095 1: la %r1,4095
lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1) lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)
lpswe __LC_MCK_OLD_PSW lpswe __LC_MCK_OLD_PSW
ENDPROC(s390_base_mcck_handler)
.section .bss .section .bss
.align 8 .align 8
...@@ -48,6 +49,7 @@ ENTRY(s390_base_ext_handler) ...@@ -48,6 +49,7 @@ ENTRY(s390_base_ext_handler)
1: lmg %r0,%r15,__LC_SAVE_AREA_ASYNC 1: lmg %r0,%r15,__LC_SAVE_AREA_ASYNC
ni __LC_EXT_OLD_PSW+1,0xfd # clear wait state bit ni __LC_EXT_OLD_PSW+1,0xfd # clear wait state bit
lpswe __LC_EXT_OLD_PSW lpswe __LC_EXT_OLD_PSW
ENDPROC(s390_base_ext_handler)
.section .bss .section .bss
.align 8 .align 8
...@@ -68,6 +70,7 @@ ENTRY(s390_base_pgm_handler) ...@@ -68,6 +70,7 @@ ENTRY(s390_base_pgm_handler)
lmg %r0,%r15,__LC_SAVE_AREA_SYNC lmg %r0,%r15,__LC_SAVE_AREA_SYNC
lpswe __LC_PGM_OLD_PSW lpswe __LC_PGM_OLD_PSW
1: lpswe disabled_wait_psw-0b(%r13) 1: lpswe disabled_wait_psw-0b(%r13)
ENDPROC(s390_base_pgm_handler)
.align 8 .align 8
disabled_wait_psw: disabled_wait_psw:
......
...@@ -224,6 +224,7 @@ ENTRY(__bpon) ...@@ -224,6 +224,7 @@ ENTRY(__bpon)
.globl __bpon .globl __bpon
BPON BPON
BR_EX %r14 BR_EX %r14
ENDPROC(__bpon)
/* /*
* Scheduler resume function, called by switch_to * Scheduler resume function, called by switch_to
...@@ -248,6 +249,7 @@ ENTRY(__switch_to) ...@@ -248,6 +249,7 @@ ENTRY(__switch_to)
lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task
ALTERNATIVE "", ".insn s,0xb2800000,_LPP_OFFSET", 40 ALTERNATIVE "", ".insn s,0xb2800000,_LPP_OFFSET", 40
BR_EX %r14 BR_EX %r14
ENDPROC(__switch_to)
.L__critical_start: .L__critical_start:
...@@ -324,6 +326,7 @@ sie_exit: ...@@ -324,6 +326,7 @@ sie_exit:
EX_TABLE(.Lrewind_pad4,.Lsie_fault) EX_TABLE(.Lrewind_pad4,.Lsie_fault)
EX_TABLE(.Lrewind_pad2,.Lsie_fault) EX_TABLE(.Lrewind_pad2,.Lsie_fault)
EX_TABLE(sie_exit,.Lsie_fault) EX_TABLE(sie_exit,.Lsie_fault)
ENDPROC(sie64a)
EXPORT_SYMBOL(sie64a) EXPORT_SYMBOL(sie64a)
EXPORT_SYMBOL(sie_exit) EXPORT_SYMBOL(sie_exit)
#endif #endif
...@@ -570,6 +573,7 @@ ENTRY(system_call) ...@@ -570,6 +573,7 @@ ENTRY(system_call)
lgr %r2,%r11 # pass pointer to pt_regs lgr %r2,%r11 # pass pointer to pt_regs
larl %r14,.Lsysc_return larl %r14,.Lsysc_return
jg do_syscall_trace_exit jg do_syscall_trace_exit
ENDPROC(system_call)
# #
# a new process exits the kernel with ret_from_fork # a new process exits the kernel with ret_from_fork
...@@ -584,10 +588,16 @@ ENTRY(ret_from_fork) ...@@ -584,10 +588,16 @@ ENTRY(ret_from_fork)
jne .Lsysc_tracenogo jne .Lsysc_tracenogo
# it's a kernel thread # it's a kernel thread
lmg %r9,%r10,__PT_R9(%r11) # load gprs lmg %r9,%r10,__PT_R9(%r11) # load gprs
la %r2,0(%r10)
BASR_EX %r14,%r9
j .Lsysc_tracenogo
ENDPROC(ret_from_fork)
ENTRY(kernel_thread_starter) ENTRY(kernel_thread_starter)
la %r2,0(%r10) la %r2,0(%r10)
BASR_EX %r14,%r9 BASR_EX %r14,%r9
j .Lsysc_tracenogo j .Lsysc_tracenogo
ENDPROC(kernel_thread_starter)
/* /*
* Program check handler routine * Program check handler routine
...@@ -698,6 +708,7 @@ ENTRY(pgm_check_handler) ...@@ -698,6 +708,7 @@ ENTRY(pgm_check_handler)
stg %r14,__LC_RETURN_PSW+8 stg %r14,__LC_RETURN_PSW+8
lghi %r14,_PIF_SYSCALL | _PIF_PER_TRAP lghi %r14,_PIF_SYSCALL | _PIF_PER_TRAP
lpswe __LC_RETURN_PSW # branch to .Lsysc_per and enable irqs lpswe __LC_RETURN_PSW # branch to .Lsysc_per and enable irqs
ENDPROC(pgm_check_handler)
/* /*
* IO interrupt handler routine * IO interrupt handler routine
...@@ -926,6 +937,7 @@ ENTRY(io_int_handler) ...@@ -926,6 +937,7 @@ ENTRY(io_int_handler)
ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
TRACE_IRQS_OFF TRACE_IRQS_OFF
j .Lio_return j .Lio_return
ENDPROC(io_int_handler)
/* /*
* External interrupt handler routine * External interrupt handler routine
...@@ -965,6 +977,7 @@ ENTRY(ext_int_handler) ...@@ -965,6 +977,7 @@ ENTRY(ext_int_handler)
lghi %r3,EXT_INTERRUPT lghi %r3,EXT_INTERRUPT
brasl %r14,do_IRQ brasl %r14,do_IRQ
j .Lio_return j .Lio_return
ENDPROC(ext_int_handler)
/* /*
* Load idle PSW. The second "half" of this function is in .Lcleanup_idle. * Load idle PSW. The second "half" of this function is in .Lcleanup_idle.
...@@ -989,6 +1002,7 @@ ENTRY(psw_idle) ...@@ -989,6 +1002,7 @@ ENTRY(psw_idle)
lpswe __SF_EMPTY(%r15) lpswe __SF_EMPTY(%r15)
BR_EX %r14 BR_EX %r14
.Lpsw_idle_end: .Lpsw_idle_end:
ENDPROC(psw_idle)
/* /*
* Store floating-point controls and floating-point or vector register * Store floating-point controls and floating-point or vector register
...@@ -1031,6 +1045,7 @@ ENTRY(save_fpu_regs) ...@@ -1031,6 +1045,7 @@ ENTRY(save_fpu_regs)
.Lsave_fpu_regs_exit: .Lsave_fpu_regs_exit:
BR_EX %r14 BR_EX %r14
.Lsave_fpu_regs_end: .Lsave_fpu_regs_end:
ENDPROC(save_fpu_regs)
EXPORT_SYMBOL(save_fpu_regs) EXPORT_SYMBOL(save_fpu_regs)
/* /*
...@@ -1077,6 +1092,7 @@ load_fpu_regs: ...@@ -1077,6 +1092,7 @@ load_fpu_regs:
.Lload_fpu_regs_exit: .Lload_fpu_regs_exit:
BR_EX %r14 BR_EX %r14
.Lload_fpu_regs_end: .Lload_fpu_regs_end:
ENDPROC(load_fpu_regs)
.L__critical_end: .L__critical_end:
...@@ -1206,6 +1222,7 @@ ENTRY(mcck_int_handler) ...@@ -1206,6 +1222,7 @@ ENTRY(mcck_int_handler)
lg %r15,__LC_NODAT_STACK lg %r15,__LC_NODAT_STACK
la %r11,STACK_FRAME_OVERHEAD(%r15) la %r11,STACK_FRAME_OVERHEAD(%r15)
j .Lmcck_skip j .Lmcck_skip
ENDPROC(mcck_int_handler)
# #
# PSW restart interrupt handler # PSW restart interrupt handler
...@@ -1232,6 +1249,7 @@ ENTRY(restart_int_handler) ...@@ -1232,6 +1249,7 @@ ENTRY(restart_int_handler)
2: sigp %r4,%r3,SIGP_STOP # sigp stop to current cpu 2: sigp %r4,%r3,SIGP_STOP # sigp stop to current cpu
brc 2,2b brc 2,2b
3: j 3b 3: j 3b
ENDPROC(restart_int_handler)
.section .kprobes.text, "ax" .section .kprobes.text, "ax"
...@@ -1241,7 +1259,7 @@ ENTRY(restart_int_handler) ...@@ -1241,7 +1259,7 @@ ENTRY(restart_int_handler)
* No need to properly save the registers, we are going to panic anyway. * No need to properly save the registers, we are going to panic anyway.
* Setup a pt_regs so that show_trace can provide a good call trace. * Setup a pt_regs so that show_trace can provide a good call trace.
*/ */
stack_overflow: ENTRY(stack_overflow)
lg %r15,__LC_NODAT_STACK # change to panic stack lg %r15,__LC_NODAT_STACK # change to panic stack
la %r11,STACK_FRAME_OVERHEAD(%r15) la %r11,STACK_FRAME_OVERHEAD(%r15)
stmg %r0,%r7,__PT_R0(%r11) stmg %r0,%r7,__PT_R0(%r11)
...@@ -1251,9 +1269,10 @@ stack_overflow: ...@@ -1251,9 +1269,10 @@ stack_overflow:
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
lgr %r2,%r11 # pass pointer to pt_regs lgr %r2,%r11 # pass pointer to pt_regs
jg kernel_stack_overflow jg kernel_stack_overflow
ENDPROC(stack_overflow)
#endif #endif
cleanup_critical: ENTRY(cleanup_critical)
#if IS_ENABLED(CONFIG_KVM) #if IS_ENABLED(CONFIG_KVM)
clg %r9,BASED(.Lcleanup_table_sie) # .Lsie_gmap clg %r9,BASED(.Lcleanup_table_sie) # .Lsie_gmap
jl 0f jl 0f
...@@ -1289,6 +1308,7 @@ cleanup_critical: ...@@ -1289,6 +1308,7 @@ cleanup_critical:
clg %r9,BASED(.Lcleanup_table+104) # .Lload_fpu_regs_end clg %r9,BASED(.Lcleanup_table+104) # .Lload_fpu_regs_end
jl .Lcleanup_load_fpu_regs jl .Lcleanup_load_fpu_regs
0: BR_EX %r14,%r11 0: BR_EX %r14,%r11
ENDPROC(cleanup_critical)
.align 8 .align 8
.Lcleanup_table: .Lcleanup_table:
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
ENTRY(ftrace_stub) ENTRY(ftrace_stub)
BR_EX %r14 BR_EX %r14
ENDPROC(ftrace_stub)
#define STACK_FRAME_SIZE (STACK_FRAME_OVERHEAD + __PT_SIZE) #define STACK_FRAME_SIZE (STACK_FRAME_OVERHEAD + __PT_SIZE)
#define STACK_PTREGS (STACK_FRAME_OVERHEAD) #define STACK_PTREGS (STACK_FRAME_OVERHEAD)
...@@ -28,7 +29,7 @@ ENTRY(ftrace_stub) ...@@ -28,7 +29,7 @@ ENTRY(ftrace_stub)
ENTRY(_mcount) ENTRY(_mcount)
BR_EX %r14 BR_EX %r14
ENDPROC(_mcount)
EXPORT_SYMBOL(_mcount) EXPORT_SYMBOL(_mcount)
ENTRY(ftrace_caller) ENTRY(ftrace_caller)
...@@ -61,7 +62,8 @@ ENTRY(ftrace_caller) ...@@ -61,7 +62,8 @@ ENTRY(ftrace_caller)
#ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER
# The j instruction gets runtime patched to a nop instruction. # The j instruction gets runtime patched to a nop instruction.
# See ftrace_enable_ftrace_graph_caller. # See ftrace_enable_ftrace_graph_caller.
ENTRY(ftrace_graph_caller) .globl ftrace_graph_caller
ftrace_graph_caller:
j ftrace_graph_caller_end j ftrace_graph_caller_end
lg %r2,(STACK_PTREGS_GPRS+14*8)(%r15) lg %r2,(STACK_PTREGS_GPRS+14*8)(%r15)
lg %r3,(STACK_PTREGS_PSW+8)(%r15) lg %r3,(STACK_PTREGS_PSW+8)(%r15)
...@@ -73,6 +75,7 @@ ftrace_graph_caller_end: ...@@ -73,6 +75,7 @@ ftrace_graph_caller_end:
lg %r1,(STACK_PTREGS_PSW+8)(%r15) lg %r1,(STACK_PTREGS_PSW+8)(%r15)
lmg %r2,%r15,(STACK_PTREGS_GPRS+2*8)(%r15) lmg %r2,%r15,(STACK_PTREGS_GPRS+2*8)(%r15)
BR_EX %r1 BR_EX %r1
ENDPROC(ftrace_caller)
#ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER
...@@ -86,5 +89,6 @@ ENTRY(return_to_handler) ...@@ -86,5 +89,6 @@ ENTRY(return_to_handler)
lgr %r14,%r2 lgr %r14,%r2
lmg %r2,%r5,32(%r15) lmg %r2,%r5,32(%r15)
BR_EX %r14 BR_EX %r14
ENDPROC(return_to_handler)
#endif #endif
...@@ -73,6 +73,7 @@ ENTRY(store_status) ...@@ -73,6 +73,7 @@ ENTRY(store_status)
lgr %r9,%r2 lgr %r9,%r2
lgr %r2,%r3 lgr %r2,%r3
BR_EX %r9 BR_EX %r9
ENDPROC(store_status)
.section .bss .section .bss
.align 8 .align 8
......
...@@ -66,6 +66,7 @@ ENTRY(relocate_kernel) ...@@ -66,6 +66,7 @@ ENTRY(relocate_kernel)
mvc 0(8,%r0),0(%r4) # copy psw to absolute address 0 mvc 0(8,%r0),0(%r4) # copy psw to absolute address 0
.diag: .diag:
diag %r0,%r0,0x308 diag %r0,%r0,0x308
ENDPROC(relocate_kernel)
.align 8 .align 8
load_psw: load_psw:
......
...@@ -108,6 +108,7 @@ ENTRY(swsusp_arch_suspend) ...@@ -108,6 +108,7 @@ ENTRY(swsusp_arch_suspend)
lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15)
lghi %r2,0 lghi %r2,0
BR_EX %r14 BR_EX %r14
ENDPROC(swsusp_arch_suspend)
/* /*
* Restore saved memory image to correct place and restore register context. * Restore saved memory image to correct place and restore register context.
...@@ -260,6 +261,7 @@ restore_registers: ...@@ -260,6 +261,7 @@ restore_registers:
lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15)
lghi %r2,0 lghi %r2,0
BR_EX %r14 BR_EX %r14
ENDPROC(swsusp_arch_resume)
.section .data..nosave,"aw",@progbits .section .data..nosave,"aw",@progbits
.align 8 .align 8
......
...@@ -178,6 +178,7 @@ ENTRY(__memset\bits) ...@@ -178,6 +178,7 @@ ENTRY(__memset\bits)
BR_EX %r14 BR_EX %r14
.L__memset_mvc\bits: .L__memset_mvc\bits:
mvc \bytes(1,%r1),0(%r1) mvc \bytes(1,%r1),0(%r1)
ENDPROC(__memset\bits)
.endm .endm
__MEMSET 16,2,sth __MEMSET 16,2,sth
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment