X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=arch%2Fparisc%2Fkernel%2Fsyscall.S;h=ae509d8cd03f24867401851975f15b2eef611300;hb=424de91dd6163808729d7082de55c319e1096bee;hp=9670a89c77fe480255ce79cf5a8705434e06d43e;hpb=0a1340c185734a57fbf4775927966ad4a1347b02;p=linux-2.6-omap-h63xx.git diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 9670a89c77f..ae509d8cd03 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -6,34 +6,31 @@ * thanks to Philipp Rumpf, Mike Shaver and various others * sorry about the wall, puffin.. */ -#include /* for CONFIG_SMP */ #include #include #include +#include #include #include - #include #include +#include +#include + /* We fill the empty parts of the gateway page with * something that will kill the kernel or a * userspace application. */ #define KILL_INSN break 0,0 -#ifdef CONFIG_64BIT - .level 2.0w -#else - .level 1.1 -#endif + .level LEVEL - .text + __HEAD .import syscall_exit,code .import syscall_exit_rfi,code - .export linux_gateway_page /* Linux gateway page is aliased to virtual page 0 in the kernel * address space. Since it is a gateway page it cannot be @@ -43,8 +40,8 @@ * pointers. */ - .align ASM_PAGE_SIZE -linux_gateway_page: + .align PAGE_SIZE +ENTRY(linux_gateway_page) /* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */ .rept 44 @@ -186,7 +183,7 @@ linux_gateway_entry: /* Are we being ptraced? */ mfctl %cr30, %r1 LDREG TI_TASK(%r1),%r1 - LDREG TASK_PTRACE(%r1), %r1 + ldw TASK_PTRACE(%r1), %r1 bb,<,n %r1,31,.Ltracesys /* Note! We cannot use the syscall table that is mapped @@ -203,7 +200,7 @@ linux_gateway_entry: ldil L%sys_call_table, %r1 ldo R%sys_call_table(%r1), %r19 #endif - comiclr,>>= __NR_Linux_syscalls, %r20, %r0 + comiclr,>> __NR_Linux_syscalls, %r20, %r0 b,n .Lsyscall_nosys LDREGX %r20(%r19), %r19 @@ -506,7 +503,7 @@ lws_compare_and_swap: shlw %r20, 4, %r20 add %r20, %r28, %r20 -# ifdef ENABLE_LWS_DEBUG +# if ENABLE_LWS_DEBUG /* DEBUG, check for deadlock! If the thread register values are the same @@ -555,7 +552,7 @@ cas_wouldblock: perspective */ cas_action: -#if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG +#if defined CONFIG_SMP && ENABLE_LWS_DEBUG /* DEBUG */ mfctl %cr27, %r1 stw %r1, 4(%sr2,%r20) @@ -567,7 +564,7 @@ cas_action: #ifdef CONFIG_SMP /* Free lock */ stw %r20, 0(%sr2,%r20) -# ifdef ENABLE_LWS_DEBUG +# if ENABLE_LWS_DEBUG /* Clear thread register indicator */ stw %r0, 4(%sr2,%r20) # endif @@ -581,7 +578,7 @@ cas_action: #ifdef CONFIG_SMP /* Free lock */ stw %r20, 0(%sr2,%r20) -# ifdef ENABLE_LWS_DEBUG +# if ENABLE_LWS_DEBUG stw %r0, 4(%sr2,%r20) # endif #endif @@ -596,73 +593,43 @@ cas_action: the other for the store. Either return -EFAULT. Each of the entries must be relocated. */ .section __ex_table,"aw" -#ifdef CONFIG_64BIT - /* Pad the address calculation */ - .word 0,(2b - linux_gateway_page) - .word 0,(3b - linux_gateway_page) -#else - .word (2b - linux_gateway_page) - .word (3b - linux_gateway_page) -#endif - .previous - - .section __ex_table,"aw" -#ifdef CONFIG_64BIT - /* Pad the address calculation */ - .word 0,(1b - linux_gateway_page) - .word 0,(3b - linux_gateway_page) -#else - .word (1b - linux_gateway_page) - .word (3b - linux_gateway_page) -#endif + ASM_ULONG_INSN (1b - linux_gateway_page), (3b - linux_gateway_page) + ASM_ULONG_INSN (2b - linux_gateway_page), (3b - linux_gateway_page) .previous -end_compare_and_swap: /* Make sure nothing else is placed on this page */ - .align ASM_PAGE_SIZE - .export end_linux_gateway_page -end_linux_gateway_page: + .align PAGE_SIZE +END(linux_gateway_page) +ENTRY(end_linux_gateway_page) /* Relocate symbols assuming linux_gateway_page is mapped to virtual address 0x0 */ -#ifdef CONFIG_64BIT - /* FIXME: The code will always be on the gateay page - and thus it will be on the first 4k, the - assembler seems to think that the final - subtraction result is only a word in - length, so we pad the value. - */ -#define LWS_ENTRY(_name_) .word 0,(lws_##_name_ - linux_gateway_page) -#else -#define LWS_ENTRY(_name_) .word (lws_##_name_ - linux_gateway_page) -#endif + +#define LWS_ENTRY(_name_) ASM_ULONG_INSN (lws_##_name_ - linux_gateway_page) .section .rodata,"a" - .align ASM_PAGE_SIZE + .align PAGE_SIZE /* Light-weight-syscall table */ /* Start of lws table. */ - .export lws_table -.Llws_table: -lws_table: +ENTRY(lws_table) LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic compare and swap */ LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic compare and swap */ +END(lws_table) /* End of lws table */ - .align ASM_PAGE_SIZE - .export sys_call_table -.Lsys_call_table: -sys_call_table: + .align PAGE_SIZE +ENTRY(sys_call_table) #include "syscall_table.S" +END(sys_call_table) #ifdef CONFIG_64BIT - .align ASM_PAGE_SIZE - .export sys_call_table64 -.Lsys_call_table64: -sys_call_table64: + .align PAGE_SIZE +ENTRY(sys_call_table64) #define SYSCALL_TABLE_64BIT #include "syscall_table.S" +END(sys_call_table64) #endif #ifdef CONFIG_SMP @@ -670,11 +637,9 @@ sys_call_table64: All light-weight-syscall atomic operations will use this set of locks */ - .section .data - .align 4096 - .export lws_lock_start -.Llws_lock_start: -lws_lock_start: + .section .data, "aw" + .align PAGE_SIZE +ENTRY(lws_lock_start) /* lws locks */ .align 16 .rept 16 @@ -684,6 +649,7 @@ lws_lock_start: .word 0 .word 0 .endr +END(lws_lock_start) .previous #endif /* CONFIG_SMP for lws_lock_start */