Merge branch 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6.git] / arch / x86 / kernel / entry_32.S
index 22d0e21..4af9fd2 100644 (file)
@@ -81,8 +81,6 @@
  * enough to patch inline, increasing performance.
  */
 
-#define nr_syscalls ((syscall_table_size)/4)
-
 #ifdef CONFIG_PREEMPT
 #define preempt_stop(clobbers) DISABLE_INTERRUPTS(clobbers); TRACE_IRQS_OFF
 #else
@@ -423,7 +421,7 @@ sysenter_past_esp:
        testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
        jnz sysenter_audit
 sysenter_do_call:
-       cmpl $(nr_syscalls), %eax
+       cmpl $(NR_syscalls), %eax
        jae syscall_badsys
        call *sys_call_table(,%eax,4)
        movl %eax,PT_EAX(%esp)
@@ -504,7 +502,7 @@ ENTRY(system_call)
                                        # system call tracing in operation / emulation
        testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
        jnz syscall_trace_entry
-       cmpl $(nr_syscalls), %eax
+       cmpl $(NR_syscalls), %eax
        jae syscall_badsys
 syscall_call:
        call *sys_call_table(,%eax,4)
@@ -654,7 +652,7 @@ syscall_trace_entry:
        movl %esp, %eax
        call syscall_trace_enter
        /* What it returned is what we'll actually use.  */
-       cmpl $(nr_syscalls), %eax
+       cmpl $(NR_syscalls), %eax
        jnae syscall_call
        jmp syscall_exit
 END(syscall_trace_entry)
@@ -694,29 +692,28 @@ END(syscall_badsys)
  * System calls that need a pt_regs pointer.
  */
 #define PTREGSCALL0(name) \
-       ALIGN; \
-ptregs_##name: \
+ENTRY(ptregs_##name) ;  \
        leal 4(%esp),%eax; \
-       jmp sys_##name;
+       jmp sys_##name; \
+ENDPROC(ptregs_##name)
 
 #define PTREGSCALL1(name) \
-       ALIGN; \
-ptregs_##name: \
+ENTRY(ptregs_##name) ; \
        leal 4(%esp),%edx; \
        movl (PT_EBX+4)(%esp),%eax; \
-       jmp sys_##name;
+       jmp sys_##name; \
+ENDPROC(ptregs_##name)
 
 #define PTREGSCALL2(name) \
-       ALIGN; \
-ptregs_##name: \
+ENTRY(ptregs_##name) ; \
        leal 4(%esp),%ecx; \
        movl (PT_ECX+4)(%esp),%edx; \
        movl (PT_EBX+4)(%esp),%eax; \
-       jmp sys_##name;
+       jmp sys_##name; \
+ENDPROC(ptregs_##name)
 
 #define PTREGSCALL3(name) \
-       ALIGN; \
-ptregs_##name: \
+ENTRY(ptregs_##name) ; \
        CFI_STARTPROC; \
        leal 4(%esp),%eax; \
        pushl_cfi %eax; \
@@ -741,8 +738,7 @@ PTREGSCALL2(vm86)
 PTREGSCALL1(vm86old)
 
 /* Clone is an oddball.  The 4th arg is in %edi */
-       ALIGN;
-ptregs_clone:
+ENTRY(ptregs_clone)
        CFI_STARTPROC
        leal 4(%esp),%eax
        pushl_cfi %eax
@@ -1213,11 +1209,6 @@ return_to_handler:
        jmp *%ecx
 #endif
 
-.section .rodata,"a"
-#include "syscall_table_32.S"
-
-syscall_table_size=(.-sys_call_table)
-
 /*
  * Some functions should be protected against kprobes
  */