hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/parisc/kernel/syscall.S
....@@ -2,7 +2,7 @@
22 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
33 *
44 * System call entry code / Linux gateway page
5
- * Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai>
5
+ * Copyright (c) Matthew Wilcox 1999 <willy@infradead.org>
66 * Licensed under the GNU GPL.
77 * thanks to Philipp Rumpf, Mike Shaver and various others
88 * sorry about the wall, puffin..
....@@ -571,8 +571,8 @@
571571 ldil L%lws_lock_start, %r20
572572 ldo R%lws_lock_start(%r20), %r28
573573
574
- /* Extract four bits from r26 and hash lock (Bits 4-7) */
575
- extru %r26, 27, 4, %r20
574
+ /* Extract eight bits from r26 and hash lock (Bits 3-11) */
575
+ extru %r26, 28, 8, %r20
576576
577577 /* Find lock to use, the hash is either one of 0 to
578578 15, multiplied by 16 (keep it 16-byte aligned)
....@@ -640,8 +640,7 @@
640640 sub,<> %r28, %r25, %r0
641641 2: stw %r24, 0(%r26)
642642 /* Free lock */
643
- sync
644
- stw %r20, 0(%sr2,%r20)
643
+ stw,ma %r20, 0(%sr2,%r20)
645644 #if ENABLE_LWS_DEBUG
646645 /* Clear thread register indicator */
647646 stw %r0, 4(%sr2,%r20)
....@@ -655,8 +654,7 @@
655654 3:
656655 /* Error occurred on load or store */
657656 /* Free lock */
658
- sync
659
- stw %r20, 0(%sr2,%r20)
657
+ stw,ma %r20, 0(%sr2,%r20)
660658 #if ENABLE_LWS_DEBUG
661659 stw %r0, 4(%sr2,%r20)
662660 #endif
....@@ -763,8 +761,8 @@
763761 ldil L%lws_lock_start, %r20
764762 ldo R%lws_lock_start(%r20), %r28
765763
766
- /* Extract four bits from r26 and hash lock (Bits 4-7) */
767
- extru %r26, 27, 4, %r20
764
+ /* Extract eight bits from r26 and hash lock (Bits 3-11) */
765
+ extru %r26, 28, 8, %r20
768766
769767 /* Find lock to use, the hash is either one of 0 to
770768 15, multiplied by 16 (keep it 16-byte aligned)
....@@ -857,8 +855,7 @@
857855
858856 cas2_end:
859857 /* Free lock */
860
- sync
861
- stw %r20, 0(%sr2,%r20)
858
+ stw,ma %r20, 0(%sr2,%r20)
862859 /* Enable interrupts */
863860 ssm PSW_SM_I, %r0
864861 /* Return to userspace, set no error */
....@@ -868,8 +865,7 @@
868865 22:
869866 /* Error occurred on load or store */
870867 /* Free lock */
871
- sync
872
- stw %r20, 0(%sr2,%r20)
868
+ stw,ma %r20, 0(%sr2,%r20)
873869 ssm PSW_SM_I, %r0
874870 ldo 1(%r0),%r28
875871 b lws_exit
....@@ -923,19 +919,24 @@
923919 END(lws_table)
924920 /* End of lws table */
925921
922
+#define __SYSCALL(nr, entry) ASM_ULONG_INSN entry
926923 .align 8
927924 ENTRY(sys_call_table)
928925 .export sys_call_table,data
929
-#include "syscall_table.S"
926
+#ifdef CONFIG_64BIT
927
+#include <asm/syscall_table_c32.h> /* Compat syscalls */
928
+#else
929
+#include <asm/syscall_table_32.h> /* 32-bit native syscalls */
930
+#endif
930931 END(sys_call_table)
931932
932933 #ifdef CONFIG_64BIT
933934 .align 8
934935 ENTRY(sys_call_table64)
935
-#define SYSCALL_TABLE_64BIT
936
-#include "syscall_table.S"
936
+#include <asm/syscall_table_64.h> /* 64-bit native syscalls */
937937 END(sys_call_table64)
938938 #endif
939
+#undef __SYSCALL
939940
940941 /*
941942 All light-weight-syscall atomic operations
....@@ -949,7 +950,7 @@
949950 .align L1_CACHE_BYTES
950951 ENTRY(lws_lock_start)
951952 /* lws locks */
952
- .rept 16
953
+ .rept 256
953954 /* Keep locks aligned at 16-bytes */
954955 .word 1
955956 .word 0