Lines Matching +full:no +full:- +full:1 +full:- +full:8 +full:- +full:v

1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Kernel entry-points.
8 #include <asm/asm-offsets.h>
30 .cfi_rel_offset 64, 8
39 .size \func, . - \func
43 * This defines the normal kernel pt-regs layout.
45 * regs 9-15 preserved by C code
46 * regs 16-18 saved by PAL-code
47 * regs 29-30 saved and set up by PAL-code
48 * JRP - Save regs 16-18 in a special area of the stack, so that
49 * the palcode-provided values are available to the signal handler.
56 stq $1, 8($sp)
62 .cfi_rel_offset $1, 8
71 stq $8, 64($sp)
89 .cfi_rel_offset $8, 64
104 ldq $1, 8($sp)
114 ldq $8, 64($sp)
131 .cfi_restore $1
138 .cfi_restore $8
149 .cfi_adjust_cfa_offset -SP_OFF
153 bsr $1, do_switch_stack
156 .cfi_rel_offset $10, 8
165 bsr $1, undo_switch_stack
173 .cfi_adjust_cfa_offset -SWITCH_STACK_SIZE
177 * Non-syscall kernel entry points.
182 lda $8, 0x3fff
184 bic $sp, $8, $8
191 lda $8, 0x3fff
193 bic $sp, $8, $8
200 /* save $9 - $15 so the inline exception code can manipulate them. */
204 stq $10, 8($sp)
211 .cfi_rel_offset $10, 8
219 lda $8, 0x3fff
220 bic $sp, $8, $8
224 ldq $10, 8($sp)
238 .cfi_adjust_cfa_offset -56
245 lda $8, 0x3fff
247 bic $sp, $8, $8
253 lda $sp, -256($sp)
259 stq $1, 8($sp)
262 and $0, 8, $0 /* user mode? */
264 bne $0, entUnaUser /* yup -> do user-level unaligned fault */
268 stq $8, 64($sp)
276 /* 16-18 PAL-saved */
289 .cfi_rel_offset $1, 1*8
290 .cfi_rel_offset $2, 2*8
291 .cfi_rel_offset $3, 3*8
292 .cfi_rel_offset $4, 4*8
293 .cfi_rel_offset $5, 5*8
294 .cfi_rel_offset $6, 6*8
295 .cfi_rel_offset $7, 7*8
296 .cfi_rel_offset $8, 8*8
297 .cfi_rel_offset $9, 9*8
298 .cfi_rel_offset $10, 10*8
299 .cfi_rel_offset $11, 11*8
300 .cfi_rel_offset $12, 12*8
301 .cfi_rel_offset $13, 13*8
302 .cfi_rel_offset $14, 14*8
303 .cfi_rel_offset $15, 15*8
304 .cfi_rel_offset $19, 19*8
305 .cfi_rel_offset $20, 20*8
306 .cfi_rel_offset $21, 21*8
307 .cfi_rel_offset $22, 22*8
308 .cfi_rel_offset $23, 23*8
309 .cfi_rel_offset $24, 24*8
310 .cfi_rel_offset $25, 25*8
311 .cfi_rel_offset $26, 26*8
312 .cfi_rel_offset $27, 27*8
313 .cfi_rel_offset $28, 28*8
314 .cfi_rel_offset $29, 29*8
315 lda $8, 0x3fff
317 bic $sp, $8, $8
320 ldq $1, 8($sp)
327 ldq $8, 64($sp)
335 /* 16-18 PAL-saved */
348 .cfi_restore $1
355 .cfi_restore $8
374 .cfi_adjust_cfa_offset -256
383 .cfi_adjust_cfa_offset -256
385 lda $sp, -56($sp)
388 stq $10, 8($sp)
395 .cfi_rel_offset $10, 8
401 lda $8, 0x3fff
403 bic $sp, $8, $8
406 ldq $10, 8($sp)
420 .cfi_adjust_cfa_offset -56
426 lda $8, 0x3fff
428 bic $sp, $8, $8
441 * Note that a0-a2 are not saved by PALcode as with the other entry points.
450 .cfi_rel_offset 64, 8
454 lda $8, 0x3fff
455 bic $sp, $8, $8
461 ldl $3, TI_FLAGS($8)
475 beq $4, 1f
477 1: jsr $26, ($27), sys_ni_syscall
482 stq $31, 72($sp) /* a3=0 => no error */
487 cmovne $26, 0, $18 /* $18 = 0 => non-restartable */
489 and $0, 8, $0
496 ldl $17, TI_FLAGS($8)
500 ldl $2, TI_STATUS($8)
528 addq $31, 1, $1 /* set a3 for errno return */
531 stq $1, 72($sp) /* a3 for return */
538 * $8: current.
554 * or got through work_notifysig already. Either case means no syscall
577 ldl $1, TI_STATUS($8)
578 and $1, TS_SAVED_FP, $3
579 or $1, TS_SAVED_FP, $2
580 bne $3, 1f
581 stl $2, TI_STATUS($8)
583 1:
597 lda $1, NR_syscalls($31)
600 cmpult $0, $1, $1
602 beq $1, 1f
604 1: jsr $26, ($27), sys_gettimeofday
611 stq $31, 72($sp) /* a3=0 => no error */
626 addq $31, 1, $1 /* set a3 for errno return */
628 stq $1, 72($sp) /* a3 for return */
643 * Save and restore the switch stack -- aka the balance of the user context.
651 .cfi_register 64, $1
653 lda $sp, -SWITCH_STACK_SIZE($sp)
656 stq $10, 8($sp)
663 ret $31, ($1), 1
665 .size do_switch_stack, .-do_switch_stack
671 .cfi_register 64, $1
674 ldq $10, 8($sp)
682 ret $31, ($1), 1
684 .size undo_switch_stack, .-undo_switch_stack
686 #define FR(n) n * 8 + TI_FP($8)
691 #define V(n) stt $f##n, FR(n) macro
692 V( 0); V( 1); V( 2); V( 3)
693 V( 4); V( 5); V( 6); V( 7)
694 V( 8); V( 9); V(10); V(11)
695 V(12); V(13); V(14); V(15)
696 V(16); V(17); V(18); V(19)
697 V(20); V(21); V(22); V(23)
698 V(24); V(25); V(26); V(27)
700 V(28); V(29); V(30)
704 #undef V
705 .size __save_fpu, .-__save_fpu
711 beq $3, 1f
712 #define V(n) ldt $f##n, FR(n) macro
714 V( 0); V( 1); V( 2); V( 3)
716 V( 4); V( 5); V( 6); V( 7)
717 V( 8); V( 9); V(10); V(11)
718 V(12); V(13); V(14); V(15)
719 V(16); V(17); V(18); V(19)
720 V(20); V(21); V(22); V(23)
721 V(24); V(25); V(26); V(27)
722 V(28); V(29); V(30)
723 1: stl $2, TI_STATUS($8)
725 #undef V
737 ldl $1, TI_STATUS($8)
738 and $1, TS_RESTORE_FP, $3
739 bne $3, 1f
740 or $1, TS_RESTORE_FP | TS_SAVED_FP, $2
741 and $1, TS_SAVED_FP, $3
742 stl $2, TI_STATUS($8)
743 bne $3, 1f
745 1:
747 lda $8, 0x3fff
749 bic $sp, $8, $8
753 .size alpha_switch_to, .-alpha_switch_to
769 * ... and new kernel threads - here
795 bsr $1, do_switch_stack
797 ldl $1, TI_STATUS($8)
798 and $1, TS_SAVED_FP, $3
799 or $1, TS_SAVED_FP, $2
800 bne $3, 1f
801 stl $2, TI_STATUS($8)
803 1:
824 lda $sp, -SWITCH_STACK_SIZE($sp)
826 bne $9, 1f
828 1: br $1, undo_switch_stack
846 Store a non-zero there - -ENOSYS we need in register
849 lda $0, -ENOSYS