Lines Matching +full:ldo +full:-
2 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
12 How does the Linux gateway page on PA-RISC work?
13 ------------------------------------------------
14 The Linux gateway page on PA-RISC is "special".
27 executed atomically (because the kernel can't be pre-empted) and they may
33 #include <asm/asm-offsets.h>
56 ldo TASK_PAGEFAULT_DISABLED(\reg2), \reg2
58 ldo 1(\reg1), \reg1
64 ldo TASK_PAGEFAULT_DISABLED(\reg2), \reg2
66 ldo -1(\reg1), \reg1
102 /* Light-weight-syscall entry must always be located at 0xb0 */
171 ldo FRAME_SIZE(%r30),%r30
192 LDREGM -FRAME_SIZE(%r30), %r2 /* get users sp back */
216 ldo TASK_PT_FR0(%r1), %r27 /* save fpregs from the kernel */
225 ldo -16(%r30),%r29 /* Reference param save area */
230 stw %r22, -52(%r30) /* 5th argument */
231 stw %r21, -56(%r30) /* 6th argument */
242 nearby since the gateway page is mapped execute-only. */
248 ldo R%sys_call_table(%r1), %r19
250 ldo R%sys_call_table64(%r1), %r19
269 ldo R%syscall_exit(%r2),%r2
274 ldo R%syscall_exit_rfi(%r2),%r2
285 ldo -ENOSYS(%r0),%r28 /* set errno */
298 * C bit set, a non-straced syscall entry results in C and D clear
320 ldo 4(%r2),%r2
322 ldo TASK_REGS(%r1),%r2
346 ldo R%tracesys_next(%r2),%r2
349 /* do_syscall_trace_enter either returned the syscallno, or -1L,
351 * task->thread.regs.gr[20] above.
364 ldo -16(%r30),%r29 /* Reference param save area */
366 stw %r22, -52(%r30) /* 5th argument */
367 stw %r21, -56(%r30) /* 6th argument */
370 cmpib,COND(=),n -1,%r20,tracesys_exit /* seccomp may have returned -1 */
375 nearby since the gateway page is mapped execute-only. */
384 ldo R%sys_call_table(%r1), %r19
386 ldo R%sys_call_table64(%r1), %r19
403 ldo R%tracesys_exit(%r2),%r2
406 ldo -ENOSYS(%r0),%r28 /* set errno */
414 ldo -16(%r30),%r29 /* Reference param save area */
416 ldo TASK_REGS(%r1),%r26
429 ldo R%tracesys_sigexit(%r2),%r2
434 ldo -16(%r30),%r29 /* Reference param save area */
437 ldo TASK_REGS(%r1),%r26
444 32/64-bit Light-Weight-Syscall ABI
446 * - Indicates a hint for userspace inline asm
449 Syscall number (caller-saves)
450 - %r20
453 Argument registers (caller-saves)
454 - %r26, %r25, %r24, %r23, %r22
457 Return registers (caller-saves)
458 - %r28 (return), %r21 (errno)
461 Caller-saves registers
462 - %r1, %r27, %r29
463 - %r2 (return pointer)
464 - %r31 (ble link register)
467 Callee-saves registers
468 - %r3-%r18
469 - %r30 (stack pointer)
472 If userspace is 32-bit:
473 Callee-saves registers
474 - %r19 (32-bit PIC register)
476 Differences from 32-bit calling convention:
477 - Syscall number in %r20
478 - Additional argument register %r22 (arg4)
479 - Callee-saves %r19.
481 If userspace is 64-bit:
482 Callee-saves registers
483 - %r27 (64-bit PIC register)
485 Differences from 64-bit calling convention:
486 - Syscall number in %r20
487 - Additional argument register %r22 (arg4)
488 - Callee-saves %r27.
492 ENOSYS - r20 was an invalid LWS number.
504 /* Clip LWS number to a 32-bit value for 32-bit processes */
514 ldo R%lws_table(%r1), %r28 /* Scratch use of r28 */
530 ldo 2(%r0), %r28
532 ldo -EAGAIN(%r0), %r21
539 ldo 3(%r0),%r28
541 ldo -EAGAIN(%r0),%r21
544 ldo 1(%r0),%r28
546 ldo -EFAULT(%r0),%r21
549 ldo -ENOSYS(%r0),%r21
570 %r26 - Address to examine
571 %r25 - Old value to check (old)
572 %r24 - New value to set (new)
573 %r28 - Return prev through this register.
574 %r21 - Kernel error code
577 EAGAIN - CAS is busy, ldcw failed, try again.
578 EFAULT - Read or write failed.
581 r28 == 1 - CAS is busy. lock contended.
582 r28 == 2 - CAS is busy. ldcw failed.
583 r28 == 3 - CAS is busy. page fault.
594 /* If we are not a 64-bit kernel, then we don't
595 * have 64-bit input registers, and calling
596 * the 64-bit LWS CAS returns ENOSYS.
607 /* Clip all the input registers for 32-bit processes */
621 /* Calculate 8-bit hash index from virtual address */
626 ldo R%lws_lock_start(%r28), %r28
629 255, multiplied by 16 (keep it 16-byte aligned)
669 ASM_EXCEPTIONTABLE_ENTRY(1b-linux_gateway_page, 5b-linux_gateway_page)
670 ASM_EXCEPTIONTABLE_ENTRY(2b-linux_gateway_page, 5b-linux_gateway_page)
674 ASM_EXCEPTIONTABLE_ENTRY(3b-linux_gateway_page, 6b-linux_gateway_page)
675 ASM_EXCEPTIONTABLE_ENTRY(4b-linux_gateway_page, 6b-linux_gateway_page)
683 %r26 - Address to examine
684 %r25 - Pointer to the value to check (old)
685 %r24 - Pointer to the value to set (new)
686 %r23 - Size of the variable (0/1/2/3 for 8/16/32/64 bit)
687 %r28 - Return non-zero on failure
688 %r21 - Kernel error code
691 EAGAIN - CAS is busy, ldcw failed, try again.
692 EFAULT - Read or write failed.
695 r28 == 1 - CAS is busy. lock contended.
696 r28 == 2 - CAS is busy. ldcw failed.
697 r28 == 3 - CAS is busy. page fault.
708 /* Clip the input registers for 32-bit processes. We don't
726 /* 8-bit load */
736 /* 16-bit load */
746 /* 32-bit load */
756 /* 64-bit load */
761 /* Load old value into r22/r23 - high/low */
778 /* Calculate 8-bit hash index from virtual address */
783 ldo R%lws_lock_start(%r28), %r28
786 255, multiplied by 16 (keep it 16-byte aligned)
821 /* Set %r28 as non-zero for now */
822 ldo 1(%r0),%r28
824 /* 8-bit CAS */
834 /* 16-bit CAS */
844 /* 32-bit CAS */
854 /* 64-bit CAS */
879 ASM_EXCEPTIONTABLE_ENTRY(1b-linux_gateway_page, 30b-linux_gateway_page)
880 ASM_EXCEPTIONTABLE_ENTRY(2b-linux_gateway_page, 30b-linux_gateway_page)
881 ASM_EXCEPTIONTABLE_ENTRY(3b-linux_gateway_page, 30b-linux_gateway_page)
882 ASM_EXCEPTIONTABLE_ENTRY(4b-linux_gateway_page, 30b-linux_gateway_page)
883 ASM_EXCEPTIONTABLE_ENTRY(5b-linux_gateway_page, 30b-linux_gateway_page)
884 ASM_EXCEPTIONTABLE_ENTRY(6b-linux_gateway_page, 30b-linux_gateway_page)
885 ASM_EXCEPTIONTABLE_ENTRY(7b-linux_gateway_page, 30b-linux_gateway_page)
886 ASM_EXCEPTIONTABLE_ENTRY(8b-linux_gateway_page, 30b-linux_gateway_page)
888 ASM_EXCEPTIONTABLE_ENTRY(9b-linux_gateway_page, 30b-linux_gateway_page)
891 ASM_EXCEPTIONTABLE_ENTRY(10b-linux_gateway_page, 30b-linux_gateway_page)
892 ASM_EXCEPTIONTABLE_ENTRY(11b-linux_gateway_page, 30b-linux_gateway_page)
896 ASM_EXCEPTIONTABLE_ENTRY(12b-linux_gateway_page, 31b-linux_gateway_page)
897 ASM_EXCEPTIONTABLE_ENTRY(13b-linux_gateway_page, 31b-linux_gateway_page)
898 ASM_EXCEPTIONTABLE_ENTRY(14b-linux_gateway_page, 31b-linux_gateway_page)
899 ASM_EXCEPTIONTABLE_ENTRY(15b-linux_gateway_page, 31b-linux_gateway_page)
900 ASM_EXCEPTIONTABLE_ENTRY(16b-linux_gateway_page, 31b-linux_gateway_page)
901 ASM_EXCEPTIONTABLE_ENTRY(17b-linux_gateway_page, 31b-linux_gateway_page)
902 ASM_EXCEPTIONTABLE_ENTRY(18b-linux_gateway_page, 31b-linux_gateway_page)
903 ASM_EXCEPTIONTABLE_ENTRY(19b-linux_gateway_page, 31b-linux_gateway_page)
905 ASM_EXCEPTIONTABLE_ENTRY(20b-linux_gateway_page, 31b-linux_gateway_page)
912 %r26 - Exchange address
913 %r25 - Size of the variable (0/1/2/3 for 8/16/32/64 bit)
914 %r24 - Address of new value
915 %r23 - Address of old value
916 %r28 - Return non-zero on failure
917 %r21 - Kernel error code
920 EAGAIN - CAS is busy, ldcw failed, try again.
921 EFAULT - Read or write failed.
924 r28 == 1 - CAS is busy. lock contended.
925 r28 == 2 - CAS is busy. ldcw failed.
926 r28 == 3 - CAS is busy. page fault.
937 /* Clip the input registers for 32-bit processes. We don't
958 /* 8-bit exchange */
968 /* 16-bit exchange */
978 /* 32-bit exchange */
988 /* 64-bit exchange */
1014 /* Calculate 8-bit hash index from virtual address */
1019 ldo R%lws_lock_start(%r28), %r28
1022 255, multiplied by 16 (keep it 16-byte aligned)
1050 /* Set %r28 as non-zero for now */
1051 ldo 1(%r0),%r28
1053 /* 8-bit exchange */
1063 /* 16-bit exchange */
1073 /* 32-bit exchange */
1083 /* 64-bit exchange */
1100 ASM_EXCEPTIONTABLE_ENTRY(1b-linux_gateway_page, 30b-linux_gateway_page)
1101 ASM_EXCEPTIONTABLE_ENTRY(2b-linux_gateway_page, 30b-linux_gateway_page)
1102 ASM_EXCEPTIONTABLE_ENTRY(3b-linux_gateway_page, 30b-linux_gateway_page)
1103 ASM_EXCEPTIONTABLE_ENTRY(4b-linux_gateway_page, 30b-linux_gateway_page)
1104 ASM_EXCEPTIONTABLE_ENTRY(5b-linux_gateway_page, 30b-linux_gateway_page)
1105 ASM_EXCEPTIONTABLE_ENTRY(6b-linux_gateway_page, 30b-linux_gateway_page)
1106 ASM_EXCEPTIONTABLE_ENTRY(7b-linux_gateway_page, 30b-linux_gateway_page)
1107 ASM_EXCEPTIONTABLE_ENTRY(8b-linux_gateway_page, 30b-linux_gateway_page)
1109 ASM_EXCEPTIONTABLE_ENTRY(9b-linux_gateway_page, 30b-linux_gateway_page)
1110 ASM_EXCEPTIONTABLE_ENTRY(10b-linux_gateway_page, 30b-linux_gateway_page)
1113 ASM_EXCEPTIONTABLE_ENTRY(11b-linux_gateway_page, 30b-linux_gateway_page)
1114 ASM_EXCEPTIONTABLE_ENTRY(12b-linux_gateway_page, 30b-linux_gateway_page)
1118 ASM_EXCEPTIONTABLE_ENTRY(14b-linux_gateway_page, 31b-linux_gateway_page)
1119 ASM_EXCEPTIONTABLE_ENTRY(15b-linux_gateway_page, 31b-linux_gateway_page)
1120 ASM_EXCEPTIONTABLE_ENTRY(16b-linux_gateway_page, 31b-linux_gateway_page)
1121 ASM_EXCEPTIONTABLE_ENTRY(17b-linux_gateway_page, 31b-linux_gateway_page)
1122 ASM_EXCEPTIONTABLE_ENTRY(18b-linux_gateway_page, 31b-linux_gateway_page)
1123 ASM_EXCEPTIONTABLE_ENTRY(19b-linux_gateway_page, 31b-linux_gateway_page)
1124 ASM_EXCEPTIONTABLE_ENTRY(20b-linux_gateway_page, 31b-linux_gateway_page)
1125 ASM_EXCEPTIONTABLE_ENTRY(21b-linux_gateway_page, 31b-linux_gateway_page)
1126 ASM_EXCEPTIONTABLE_ENTRY(22b-linux_gateway_page, 31b-linux_gateway_page)
1127 ASM_EXCEPTIONTABLE_ENTRY(23b-linux_gateway_page, 31b-linux_gateway_page)
1128 ASM_EXCEPTIONTABLE_ENTRY(24b-linux_gateway_page, 31b-linux_gateway_page)
1129 ASM_EXCEPTIONTABLE_ENTRY(25b-linux_gateway_page, 31b-linux_gateway_page)
1130 ASM_EXCEPTIONTABLE_ENTRY(26b-linux_gateway_page, 31b-linux_gateway_page)
1131 ASM_EXCEPTIONTABLE_ENTRY(27b-linux_gateway_page, 31b-linux_gateway_page)
1132 ASM_EXCEPTIONTABLE_ENTRY(28b-linux_gateway_page, 31b-linux_gateway_page)
1133 ASM_EXCEPTIONTABLE_ENTRY(29b-linux_gateway_page, 31b-linux_gateway_page)
1138 %r26 - Address to store
1139 %r25 - Size of the variable (0/1/2/3 for 8/16/32/64 bit)
1140 %r24 - Address of value to store
1141 %r28 - Return non-zero on failure
1142 %r21 - Kernel error code
1145 EAGAIN - CAS is busy, ldcw failed, try again.
1146 EFAULT - Read or write failed.
1149 r28 == 1 - CAS is busy. lock contended.
1150 r28 == 2 - CAS is busy. ldcw failed.
1151 r28 == 3 - CAS is busy. page fault.
1162 /* Clip the input registers for 32-bit processes. We don't
1180 /* 8-bit store */
1186 /* 16-bit store */
1192 /* 32-bit store */
1198 /* 64-bit store */
1213 /* Calculate 8-bit hash index from virtual address */
1218 ldo R%lws_lock_start(%r28), %r28
1221 255, multiplied by 16 (keep it 16-byte aligned)
1249 /* Set %r28 as non-zero for now */
1250 ldo 1(%r0),%r28
1252 /* 8-bit store */
1258 /* 16-bit store */
1264 /* 32-bit store */
1270 /* 64-bit store */
1283 ASM_EXCEPTIONTABLE_ENTRY(1b-linux_gateway_page, 30b-linux_gateway_page)
1284 ASM_EXCEPTIONTABLE_ENTRY(2b-linux_gateway_page, 30b-linux_gateway_page)
1285 ASM_EXCEPTIONTABLE_ENTRY(3b-linux_gateway_page, 30b-linux_gateway_page)
1286 ASM_EXCEPTIONTABLE_ENTRY(4b-linux_gateway_page, 30b-linux_gateway_page)
1288 ASM_EXCEPTIONTABLE_ENTRY(5b-linux_gateway_page, 30b-linux_gateway_page)
1291 ASM_EXCEPTIONTABLE_ENTRY(6b-linux_gateway_page, 30b-linux_gateway_page)
1292 ASM_EXCEPTIONTABLE_ENTRY(7b-linux_gateway_page, 30b-linux_gateway_page)
1296 ASM_EXCEPTIONTABLE_ENTRY(9b-linux_gateway_page, 31b-linux_gateway_page)
1297 ASM_EXCEPTIONTABLE_ENTRY(10b-linux_gateway_page, 31b-linux_gateway_page)
1298 ASM_EXCEPTIONTABLE_ENTRY(11b-linux_gateway_page, 31b-linux_gateway_page)
1299 ASM_EXCEPTIONTABLE_ENTRY(12b-linux_gateway_page, 31b-linux_gateway_page)
1300 ASM_EXCEPTIONTABLE_ENTRY(13b-linux_gateway_page, 31b-linux_gateway_page)
1301 ASM_EXCEPTIONTABLE_ENTRY(14b-linux_gateway_page, 31b-linux_gateway_page)
1302 ASM_EXCEPTIONTABLE_ENTRY(15b-linux_gateway_page, 31b-linux_gateway_page)
1303 ASM_EXCEPTIONTABLE_ENTRY(16b-linux_gateway_page, 31b-linux_gateway_page)
1313 #define LWS_ENTRY(_name_) ASM_ULONG_INSN (lws_##_name_ - linux_gateway_page)
1318 /* Light-weight-syscall table */
1321 LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic 32bit CAS */
1322 LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic 32bit CAS */
1323 LWS_ENTRY(compare_and_swap_2) /* 2 - Atomic 64bit CAS */
1324 LWS_ENTRY(atomic_xchg) /* 3 - Atomic Exchange */
1325 LWS_ENTRY(atomic_store) /* 4 - Atomic Store */
1338 #include <asm/syscall_table_32.h> /* 32-bit syscalls */
1346 #include <asm/syscall_table_64.h> /* 64-bit syscalls */
1351 All light-weight-syscall atomic operations
1355 at least 16-byte aligned for safe use
1363 /* Keep locks aligned at 16-bytes */