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>
26 .cfi_rel_offset 64, 8
35 .size \func, . - \func
39 * This defines the normal kernel pt-regs layout.
41 * regs 9-15 preserved by C code
42 * regs 16-18 saved by PAL-code
43 * regs 29-30 saved and set up by PAL-code
44 * JRP - Save regs 16-18 in a special area of the stack, so that
45 * the palcode-provided values are available to the signal handler.
52 stq $1, 8($sp)
58 .cfi_rel_offset $1, 8
67 stq $8, 64($sp)
85 .cfi_rel_offset $8, 64
100 ldq $1, 8($sp)
110 ldq $8, 64($sp)
127 .cfi_restore $1
134 .cfi_restore $8
145 .cfi_adjust_cfa_offset -SP_OFF
149 bsr $1, do_switch_stack
152 .cfi_rel_offset $10, 8
161 bsr $1, undo_switch_stack
169 .cfi_adjust_cfa_offset -SWITCH_STACK_SIZE
173 * Non-syscall kernel entry points.
178 lda $8, 0x3fff
180 bic $sp, $8, $8
187 lda $8, 0x3fff
189 bic $sp, $8, $8
196 /* save $9 - $15 so the inline exception code can manipulate them. */
200 stq $10, 8($sp)
207 .cfi_rel_offset $10, 8
215 lda $8, 0x3fff
216 bic $sp, $8, $8
220 ldq $10, 8($sp)
234 .cfi_adjust_cfa_offset -64
241 lda $8, 0x3fff
243 bic $sp, $8, $8
249 lda $sp, -256($sp)
255 stq $1, 8($sp)
258 and $0, 8, $0 /* user mode? */
260 bne $0, entUnaUser /* yup -> do user-level unaligned fault */
264 stq $8, 64($sp)
272 /* 16-18 PAL-saved */
285 .cfi_rel_offset $1, 1*8
286 .cfi_rel_offset $2, 2*8
287 .cfi_rel_offset $3, 3*8
288 .cfi_rel_offset $4, 4*8
289 .cfi_rel_offset $5, 5*8
290 .cfi_rel_offset $6, 6*8
291 .cfi_rel_offset $7, 7*8
292 .cfi_rel_offset $8, 8*8
293 .cfi_rel_offset $9, 9*8
294 .cfi_rel_offset $10, 10*8
295 .cfi_rel_offset $11, 11*8
296 .cfi_rel_offset $12, 12*8
297 .cfi_rel_offset $13, 13*8
298 .cfi_rel_offset $14, 14*8
299 .cfi_rel_offset $15, 15*8
300 .cfi_rel_offset $19, 19*8
301 .cfi_rel_offset $20, 20*8
302 .cfi_rel_offset $21, 21*8
303 .cfi_rel_offset $22, 22*8
304 .cfi_rel_offset $23, 23*8
305 .cfi_rel_offset $24, 24*8
306 .cfi_rel_offset $25, 25*8
307 .cfi_rel_offset $26, 26*8
308 .cfi_rel_offset $27, 27*8
309 .cfi_rel_offset $28, 28*8
310 .cfi_rel_offset $29, 29*8
311 lda $8, 0x3fff
313 bic $sp, $8, $8
316 ldq $1, 8($sp)
323 ldq $8, 64($sp)
331 /* 16-18 PAL-saved */
344 .cfi_restore $1
351 .cfi_restore $8
370 .cfi_adjust_cfa_offset -256
379 .cfi_adjust_cfa_offset -256
381 lda $sp, -64($sp)
384 stq $10, 8($sp)
391 .cfi_rel_offset $10, 8
397 lda $8, 0x3fff
399 bic $sp, $8, $8
402 ldq $10, 8($sp)
416 .cfi_adjust_cfa_offset -64
422 lda $8, 0x3fff
424 bic $sp, $8, $8
437 * Note that a0-a2 are not saved by PALcode as with the other entry points.
446 .cfi_rel_offset 64, 8
450 lda $8, 0x3fff
451 bic $sp, $8, $8
457 ldl $3, TI_FLAGS($8)
471 beq $4, 1f
473 1: jsr $26, ($27), sys_ni_syscall
478 stq $31, 72($sp) /* a3=0 => no error */
483 cmovne $26, 0, $18 /* $18 = 0 => non-restartable */
485 and $0, 8, $0
492 ldl $17, TI_FLAGS($8)
496 ldl $2, TI_STATUS($8)
524 addq $31, 1, $1 /* set a3 for errno return */
527 stq $1, 72($sp) /* a3 for return */
534 * $8: current.
550 * or got through work_notifysig already. Either case means no syscall
573 ldl $1, TI_STATUS($8)
574 and $1, TS_SAVED_FP, $3
575 or $1, TS_SAVED_FP, $2
576 bne $3, 1f
577 stl $2, TI_STATUS($8)
579 1:
593 lda $1, NR_syscalls($31)
596 cmpult $0, $1, $1
598 beq $1, 1f
600 1: jsr $26, ($27), sys_gettimeofday
607 stq $31, 72($sp) /* a3=0 => no error */
622 addq $31, 1, $1 /* set a3 for errno return */
624 stq $1, 72($sp) /* a3 for return */
639 * Save and restore the switch stack -- aka the balance of the user context.
647 .cfi_register 64, $1
649 lda $sp, -SWITCH_STACK_SIZE($sp)
652 stq $10, 8($sp)
659 ret $31, ($1), 1
661 .size do_switch_stack, .-do_switch_stack
667 .cfi_register 64, $1
670 ldq $10, 8($sp)
678 ret $31, ($1), 1
680 .size undo_switch_stack, .-undo_switch_stack
682 #define FR(n) n * 8 + TI_FP($8)
687 #define V(n) stt $f##n, FR(n) macro
688 V( 0); V( 1); V( 2); V( 3)
689 V( 4); V( 5); V( 6); V( 7)
690 V( 8); V( 9); V(10); V(11)
691 V(12); V(13); V(14); V(15)
692 V(16); V(17); V(18); V(19)
693 V(20); V(21); V(22); V(23)
694 V(24); V(25); V(26); V(27)
696 V(28); V(29); V(30)
700 #undef V
701 .size __save_fpu, .-__save_fpu
707 beq $3, 1f
708 #define V(n) ldt $f##n, FR(n) macro
710 V( 0); V( 1); V( 2); V( 3)
712 V( 4); V( 5); V( 6); V( 7)
713 V( 8); V( 9); V(10); V(11)
714 V(12); V(13); V(14); V(15)
715 V(16); V(17); V(18); V(19)
716 V(20); V(21); V(22); V(23)
717 V(24); V(25); V(26); V(27)
718 V(28); V(29); V(30)
719 1: stl $2, TI_STATUS($8)
721 #undef V
733 ldl $1, TI_STATUS($8)
734 and $1, TS_RESTORE_FP, $3
735 bne $3, 1f
736 or $1, TS_RESTORE_FP | TS_SAVED_FP, $2
737 and $1, TS_SAVED_FP, $3
738 stl $2, TI_STATUS($8)
739 bne $3, 1f
741 1:
743 lda $8, 0x3fff
745 bic $sp, $8, $8
749 .size alpha_switch_to, .-alpha_switch_to
765 * ... and new kernel threads - here
791 bsr $1, do_switch_stack
793 ldl $1, TI_STATUS($8)
794 and $1, TS_SAVED_FP, $3
795 or $1, TS_SAVED_FP, $2
796 bne $3, 1f
797 stl $2, TI_STATUS($8)
799 1:
819 lda $sp, -SWITCH_STACK_SIZE($sp)
821 bne $9, 1f
823 1: br $1, undo_switch_stack
841 Store a non-zero there - -ENOSYS we need in register
844 lda $0, -ENOSYS