• Home
  • Raw
  • Download

Lines Matching +full:light +full:- +full:weight

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>
75 /* Light-weight-syscall entry must always be located at 0xb0 */
166 LDREGM -FRAME_SIZE(%r30), %r2 /* get users sp back */
199 ldo -16(%r30),%r29 /* Reference param save area */
204 stw %r22, -52(%r30) /* 5th argument */
205 stw %r21, -56(%r30) /* 6th argument */
216 nearby since the gateway page is mapped execute-only. */
221 addil L%(sys_call_table64-sys_call_table), %r1
259 ldo -ENOSYS(%r0),%r28 /* set errno */
272 * C bit set, a non-straced syscall entry results in C and D clear
275 ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
324 /* do_syscall_trace_enter either returned the syscallno, or -1L,
326 * task->thread.regs.gr[20] above.
330 ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
340 ldo -16(%r30),%r29 /* Reference param save area */
342 stw %r22, -52(%r30) /* 5th argument */
343 stw %r21, -56(%r30) /* 6th argument */
346 cmpib,COND(=),n -1,%r20,tracesys_exit /* seccomp may have returned -1 */
351 nearby since the gateway page is mapped execute-only. */
359 addil L%(sys_call_table64-sys_call_table), %r1
382 ldo -ENOSYS(%r0),%r28 /* set errno */
388 ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
391 ldo -16(%r30),%r29 /* Reference param save area */
396 ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
410 ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
413 ldo -16(%r30),%r29 /* Reference param save area */
423 32/64-bit Light-Weight-Syscall ABI
425 * - Indicates a hint for userspace inline asm
428 Syscall number (caller-saves)
429 - %r20
432 Argument registers (caller-saves)
433 - %r26, %r25, %r24, %r23, %r22
436 Return registers (caller-saves)
437 - %r28 (return), %r21 (errno)
440 Caller-saves registers
441 - %r1, %r27, %r29
442 - %r2 (return pointer)
443 - %r31 (ble link register)
446 Callee-saves registers
447 - %r3-%r18
448 - %r30 (stack pointer)
451 If userspace is 32-bit:
452 Callee-saves registers
453 - %r19 (32-bit PIC register)
455 Differences from 32-bit calling convention:
456 - Syscall number in %r20
457 - Additional argument register %r22 (arg4)
458 - Callee-saves %r19.
460 If userspace is 64-bit:
461 Callee-saves registers
462 - %r27 (64-bit PIC register)
464 Differences from 64-bit calling convention:
465 - Syscall number in %r20
466 - Additional argument register %r22 (arg4)
467 - Callee-saves %r27.
471 ENOSYS - r20 was an invalid LWS number.
483 /* Clip LWS number to a 32-bit value for 32-bit processes */
500 ldo -ENOSYS(%r0),%r21 /* set errno */
521 %r26 - Address to examine
522 %r25 - Old value to check (old)
523 %r24 - New value to set (new)
524 %r28 - Return prev through this register.
525 %r21 - Kernel error code
531 EAGAIN - CAS is busy, ldcw failed, try again.
532 EFAULT - Read or write failed.
536 EDEADLOCK - CAS called recursively.
537 EAGAIN && r28 == 1 - CAS is busy. Lock contended.
538 EAGAIN && r28 == 2 - CAS is busy. ldcw failed.
539 EFAULT - Read or write failed.
553 /* If we are not a 64-bit kernel, then we don't
554 * have 64-bit input registers, and calling
555 * the 64-bit LWS CAS returns ENOSYS.
574 /* Extract eight bits from r26 and hash lock (Bits 3-11) */
578 15, multiplied by 16 (keep it 16-byte aligned)
596 ldo -EDEADLOCK(%r0), %r21
601 ldo -EAGAIN(%r0), %r21 /* Spin in userspace */
614 ldo -EAGAIN(%r0), %r21 /* Spin in userspace */
663 ldo -EFAULT(%r0),%r21 /* set errno */
670 the other for the store. Either return -EFAULT.
672 ASM_EXCEPTIONTABLE_ENTRY(1b-linux_gateway_page, 3b-linux_gateway_page)
673 ASM_EXCEPTIONTABLE_ENTRY(2b-linux_gateway_page, 3b-linux_gateway_page)
681 %r26 - Address to examine
682 %r25 - Pointer to the value to check (old)
683 %r24 - Pointer to the value to set (new)
684 %r23 - Size of the variable (0/1/2/3 for 8/16/32/64 bit)
685 %r28 - Return non-zero on failure
686 %r21 - Kernel error code
690 EAGAIN - CAS is busy, ldcw failed, try again.
691 EFAULT - Read or write failed.
752 /* Load old value into r22/r23 - high/low */
764 /* Extract eight bits from r26 and hash lock (Bits 3-11) */
768 15, multiplied by 16 (keep it 16-byte aligned)
781 ldo -EAGAIN(%r0), %r21 /* Spin in userspace */
802 /* Set %r28 as non-zero for now */
872 ldo -EFAULT(%r0),%r21 /* set errno */
879 ASM_EXCEPTIONTABLE_ENTRY(4b-linux_gateway_page, 22b-linux_gateway_page)
880 ASM_EXCEPTIONTABLE_ENTRY(5b-linux_gateway_page, 22b-linux_gateway_page)
881 ASM_EXCEPTIONTABLE_ENTRY(6b-linux_gateway_page, 22b-linux_gateway_page)
882 ASM_EXCEPTIONTABLE_ENTRY(7b-linux_gateway_page, 22b-linux_gateway_page)
883 ASM_EXCEPTIONTABLE_ENTRY(8b-linux_gateway_page, 22b-linux_gateway_page)
884 ASM_EXCEPTIONTABLE_ENTRY(9b-linux_gateway_page, 22b-linux_gateway_page)
885 ASM_EXCEPTIONTABLE_ENTRY(10b-linux_gateway_page, 22b-linux_gateway_page)
886 ASM_EXCEPTIONTABLE_ENTRY(11b-linux_gateway_page, 22b-linux_gateway_page)
887 ASM_EXCEPTIONTABLE_ENTRY(13b-linux_gateway_page, 22b-linux_gateway_page)
888 ASM_EXCEPTIONTABLE_ENTRY(14b-linux_gateway_page, 22b-linux_gateway_page)
889 ASM_EXCEPTIONTABLE_ENTRY(15b-linux_gateway_page, 22b-linux_gateway_page)
890 ASM_EXCEPTIONTABLE_ENTRY(16b-linux_gateway_page, 22b-linux_gateway_page)
891 ASM_EXCEPTIONTABLE_ENTRY(17b-linux_gateway_page, 22b-linux_gateway_page)
892 ASM_EXCEPTIONTABLE_ENTRY(18b-linux_gateway_page, 22b-linux_gateway_page)
893 ASM_EXCEPTIONTABLE_ENTRY(19b-linux_gateway_page, 22b-linux_gateway_page)
894 ASM_EXCEPTIONTABLE_ENTRY(20b-linux_gateway_page, 22b-linux_gateway_page)
896 ASM_EXCEPTIONTABLE_ENTRY(12b-linux_gateway_page, 22b-linux_gateway_page)
897 ASM_EXCEPTIONTABLE_ENTRY(21b-linux_gateway_page, 22b-linux_gateway_page)
908 #define LWS_ENTRY(_name_) ASM_ULONG_INSN (lws_##_name_ - linux_gateway_page)
913 /* Light-weight-syscall table */
916 LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic 32bit CAS */
917 LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic 32bit CAS */
918 LWS_ENTRY(compare_and_swap_2) /* 2 - ELF32 Atomic 64bit CAS */
929 #include <asm/syscall_table_32.h> /* 32-bit native syscalls */
936 #include <asm/syscall_table_64.h> /* 64-bit native syscalls */
942 All light-weight-syscall atomic operations
946 at least 16-byte aligned for safe use
954 /* Keep locks aligned at 16-bytes */