diff options
Diffstat (limited to 'arch/parisc/kernel/syscall.S')
-rw-r--r-- | arch/parisc/kernel/syscall.S | 71 |
1 files changed, 18 insertions, 53 deletions
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index a05800429304..10859f53e94f 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -12,27 +12,23 @@ | |||
12 | #include <asm/errno.h> | 12 | #include <asm/errno.h> |
13 | #include <asm/psw.h> | 13 | #include <asm/psw.h> |
14 | #include <asm/thread_info.h> | 14 | #include <asm/thread_info.h> |
15 | |||
16 | #include <asm/assembly.h> | 15 | #include <asm/assembly.h> |
17 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
18 | 17 | ||
18 | #include <linux/linkage.h> | ||
19 | |||
19 | /* We fill the empty parts of the gateway page with | 20 | /* We fill the empty parts of the gateway page with |
20 | * something that will kill the kernel or a | 21 | * something that will kill the kernel or a |
21 | * userspace application. | 22 | * userspace application. |
22 | */ | 23 | */ |
23 | #define KILL_INSN break 0,0 | 24 | #define KILL_INSN break 0,0 |
24 | 25 | ||
25 | #ifdef CONFIG_64BIT | 26 | .level LEVEL |
26 | .level 2.0w | ||
27 | #else | ||
28 | .level 1.1 | ||
29 | #endif | ||
30 | 27 | ||
31 | .text | 28 | .text |
32 | 29 | ||
33 | .import syscall_exit,code | 30 | .import syscall_exit,code |
34 | .import syscall_exit_rfi,code | 31 | .import syscall_exit_rfi,code |
35 | .export linux_gateway_page | ||
36 | 32 | ||
37 | /* Linux gateway page is aliased to virtual page 0 in the kernel | 33 | /* Linux gateway page is aliased to virtual page 0 in the kernel |
38 | * address space. Since it is a gateway page it cannot be | 34 | * address space. Since it is a gateway page it cannot be |
@@ -43,7 +39,7 @@ | |||
43 | */ | 39 | */ |
44 | 40 | ||
45 | .align ASM_PAGE_SIZE | 41 | .align ASM_PAGE_SIZE |
46 | linux_gateway_page: | 42 | ENTRY(linux_gateway_page) |
47 | 43 | ||
48 | /* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */ | 44 | /* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */ |
49 | .rept 44 | 45 | .rept 44 |
@@ -595,73 +591,43 @@ cas_action: | |||
595 | the other for the store. Either return -EFAULT. | 591 | the other for the store. Either return -EFAULT. |
596 | Each of the entries must be relocated. */ | 592 | Each of the entries must be relocated. */ |
597 | .section __ex_table,"aw" | 593 | .section __ex_table,"aw" |
598 | #ifdef CONFIG_64BIT | 594 | ASM_ULONG_INSN (1b - linux_gateway_page), (3b - linux_gateway_page) |
599 | /* Pad the address calculation */ | 595 | ASM_ULONG_INSN (2b - linux_gateway_page), (3b - linux_gateway_page) |
600 | .word 0,(2b - linux_gateway_page) | ||
601 | .word 0,(3b - linux_gateway_page) | ||
602 | #else | ||
603 | .word (2b - linux_gateway_page) | ||
604 | .word (3b - linux_gateway_page) | ||
605 | #endif | ||
606 | .previous | 596 | .previous |
607 | 597 | ||
608 | .section __ex_table,"aw" | ||
609 | #ifdef CONFIG_64BIT | ||
610 | /* Pad the address calculation */ | ||
611 | .word 0,(1b - linux_gateway_page) | ||
612 | .word 0,(3b - linux_gateway_page) | ||
613 | #else | ||
614 | .word (1b - linux_gateway_page) | ||
615 | .word (3b - linux_gateway_page) | ||
616 | #endif | ||
617 | .previous | ||
618 | |||
619 | end_compare_and_swap: | ||
620 | 598 | ||
621 | /* Make sure nothing else is placed on this page */ | 599 | /* Make sure nothing else is placed on this page */ |
622 | .align ASM_PAGE_SIZE | 600 | .align ASM_PAGE_SIZE |
623 | .export end_linux_gateway_page | 601 | END(linux_gateway_page) |
624 | end_linux_gateway_page: | 602 | ENTRY(end_linux_gateway_page) |
625 | 603 | ||
626 | /* Relocate symbols assuming linux_gateway_page is mapped | 604 | /* Relocate symbols assuming linux_gateway_page is mapped |
627 | to virtual address 0x0 */ | 605 | to virtual address 0x0 */ |
628 | #ifdef CONFIG_64BIT | 606 | |
629 | /* FIXME: The code will always be on the gateay page | 607 | #define LWS_ENTRY(_name_) ASM_ULONG_INSN (lws_##_name_ - linux_gateway_page) |
630 | and thus it will be on the first 4k, the | ||
631 | assembler seems to think that the final | ||
632 | subtraction result is only a word in | ||
633 | length, so we pad the value. | ||
634 | */ | ||
635 | #define LWS_ENTRY(_name_) .word 0,(lws_##_name_ - linux_gateway_page) | ||
636 | #else | ||
637 | #define LWS_ENTRY(_name_) .word (lws_##_name_ - linux_gateway_page) | ||
638 | #endif | ||
639 | 608 | ||
640 | .section .rodata,"a" | 609 | .section .rodata,"a" |
641 | 610 | ||
642 | .align ASM_PAGE_SIZE | 611 | .align ASM_PAGE_SIZE |
643 | /* Light-weight-syscall table */ | 612 | /* Light-weight-syscall table */ |
644 | /* Start of lws table. */ | 613 | /* Start of lws table. */ |
645 | .export lws_table | 614 | ENTRY(lws_table) |
646 | .Llws_table: | ||
647 | lws_table: | ||
648 | LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic compare and swap */ | 615 | LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic compare and swap */ |
649 | LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic compare and swap */ | 616 | LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic compare and swap */ |
617 | END(lws_table) | ||
650 | /* End of lws table */ | 618 | /* End of lws table */ |
651 | 619 | ||
652 | .align ASM_PAGE_SIZE | 620 | .align ASM_PAGE_SIZE |
653 | .export sys_call_table | 621 | ENTRY(sys_call_table) |
654 | .Lsys_call_table: | ||
655 | sys_call_table: | ||
656 | #include "syscall_table.S" | 622 | #include "syscall_table.S" |
623 | END(sys_call_table) | ||
657 | 624 | ||
658 | #ifdef CONFIG_64BIT | 625 | #ifdef CONFIG_64BIT |
659 | .align ASM_PAGE_SIZE | 626 | .align ASM_PAGE_SIZE |
660 | .export sys_call_table64 | 627 | ENTRY(sys_call_table64) |
661 | .Lsys_call_table64: | ||
662 | sys_call_table64: | ||
663 | #define SYSCALL_TABLE_64BIT | 628 | #define SYSCALL_TABLE_64BIT |
664 | #include "syscall_table.S" | 629 | #include "syscall_table.S" |
630 | END(sys_call_table64) | ||
665 | #endif | 631 | #endif |
666 | 632 | ||
667 | #ifdef CONFIG_SMP | 633 | #ifdef CONFIG_SMP |
@@ -671,9 +637,7 @@ sys_call_table64: | |||
671 | */ | 637 | */ |
672 | .section .data | 638 | .section .data |
673 | .align 4096 | 639 | .align 4096 |
674 | .export lws_lock_start | 640 | ENTRY(lws_lock_start) |
675 | .Llws_lock_start: | ||
676 | lws_lock_start: | ||
677 | /* lws locks */ | 641 | /* lws locks */ |
678 | .align 16 | 642 | .align 16 |
679 | .rept 16 | 643 | .rept 16 |
@@ -683,6 +647,7 @@ lws_lock_start: | |||
683 | .word 0 | 647 | .word 0 |
684 | .word 0 | 648 | .word 0 |
685 | .endr | 649 | .endr |
650 | END(lws_lock_start) | ||
686 | .previous | 651 | .previous |
687 | #endif | 652 | #endif |
688 | /* CONFIG_SMP for lws_lock_start */ | 653 | /* CONFIG_SMP for lws_lock_start */ |