| .. | .. |
|---|
| 2 | 2 | * Linux/PA-RISC Project (http://www.parisc-linux.org/) |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * 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> |
|---|
| 6 | 6 | * Licensed under the GNU GPL. |
|---|
| 7 | 7 | * thanks to Philipp Rumpf, Mike Shaver and various others |
|---|
| 8 | 8 | * sorry about the wall, puffin.. |
|---|
| .. | .. |
|---|
| 571 | 571 | ldil L%lws_lock_start, %r20 |
|---|
| 572 | 572 | ldo R%lws_lock_start(%r20), %r28 |
|---|
| 573 | 573 | |
|---|
| 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 |
|---|
| 576 | 576 | |
|---|
| 577 | 577 | /* Find lock to use, the hash is either one of 0 to |
|---|
| 578 | 578 | 15, multiplied by 16 (keep it 16-byte aligned) |
|---|
| .. | .. |
|---|
| 640 | 640 | sub,<> %r28, %r25, %r0 |
|---|
| 641 | 641 | 2: stw %r24, 0(%r26) |
|---|
| 642 | 642 | /* Free lock */ |
|---|
| 643 | | - sync |
|---|
| 644 | | - stw %r20, 0(%sr2,%r20) |
|---|
| 643 | + stw,ma %r20, 0(%sr2,%r20) |
|---|
| 645 | 644 | #if ENABLE_LWS_DEBUG |
|---|
| 646 | 645 | /* Clear thread register indicator */ |
|---|
| 647 | 646 | stw %r0, 4(%sr2,%r20) |
|---|
| .. | .. |
|---|
| 655 | 654 | 3: |
|---|
| 656 | 655 | /* Error occurred on load or store */ |
|---|
| 657 | 656 | /* Free lock */ |
|---|
| 658 | | - sync |
|---|
| 659 | | - stw %r20, 0(%sr2,%r20) |
|---|
| 657 | + stw,ma %r20, 0(%sr2,%r20) |
|---|
| 660 | 658 | #if ENABLE_LWS_DEBUG |
|---|
| 661 | 659 | stw %r0, 4(%sr2,%r20) |
|---|
| 662 | 660 | #endif |
|---|
| .. | .. |
|---|
| 763 | 761 | ldil L%lws_lock_start, %r20 |
|---|
| 764 | 762 | ldo R%lws_lock_start(%r20), %r28 |
|---|
| 765 | 763 | |
|---|
| 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 |
|---|
| 768 | 766 | |
|---|
| 769 | 767 | /* Find lock to use, the hash is either one of 0 to |
|---|
| 770 | 768 | 15, multiplied by 16 (keep it 16-byte aligned) |
|---|
| .. | .. |
|---|
| 857 | 855 | |
|---|
| 858 | 856 | cas2_end: |
|---|
| 859 | 857 | /* Free lock */ |
|---|
| 860 | | - sync |
|---|
| 861 | | - stw %r20, 0(%sr2,%r20) |
|---|
| 858 | + stw,ma %r20, 0(%sr2,%r20) |
|---|
| 862 | 859 | /* Enable interrupts */ |
|---|
| 863 | 860 | ssm PSW_SM_I, %r0 |
|---|
| 864 | 861 | /* Return to userspace, set no error */ |
|---|
| .. | .. |
|---|
| 868 | 865 | 22: |
|---|
| 869 | 866 | /* Error occurred on load or store */ |
|---|
| 870 | 867 | /* Free lock */ |
|---|
| 871 | | - sync |
|---|
| 872 | | - stw %r20, 0(%sr2,%r20) |
|---|
| 868 | + stw,ma %r20, 0(%sr2,%r20) |
|---|
| 873 | 869 | ssm PSW_SM_I, %r0 |
|---|
| 874 | 870 | ldo 1(%r0),%r28 |
|---|
| 875 | 871 | b lws_exit |
|---|
| .. | .. |
|---|
| 923 | 919 | END(lws_table) |
|---|
| 924 | 920 | /* End of lws table */ |
|---|
| 925 | 921 | |
|---|
| 922 | +#define __SYSCALL(nr, entry) ASM_ULONG_INSN entry |
|---|
| 926 | 923 | .align 8 |
|---|
| 927 | 924 | ENTRY(sys_call_table) |
|---|
| 928 | 925 | .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 |
|---|
| 930 | 931 | END(sys_call_table) |
|---|
| 931 | 932 | |
|---|
| 932 | 933 | #ifdef CONFIG_64BIT |
|---|
| 933 | 934 | .align 8 |
|---|
| 934 | 935 | 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 */ |
|---|
| 937 | 937 | END(sys_call_table64) |
|---|
| 938 | 938 | #endif |
|---|
| 939 | +#undef __SYSCALL |
|---|
| 939 | 940 | |
|---|
| 940 | 941 | /* |
|---|
| 941 | 942 | All light-weight-syscall atomic operations |
|---|
| .. | .. |
|---|
| 949 | 950 | .align L1_CACHE_BYTES |
|---|
| 950 | 951 | ENTRY(lws_lock_start) |
|---|
| 951 | 952 | /* lws locks */ |
|---|
| 952 | | - .rept 16 |
|---|
| 953 | + .rept 256 |
|---|
| 953 | 954 | /* Keep locks aligned at 16-bytes */ |
|---|
| 954 | 955 | .word 1 |
|---|
| 955 | 956 | .word 0 |
|---|