aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/entry.S
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2007-02-13 07:26:24 -0500
committerAndi Kleen <andi@basil.nowhere.org>2007-02-13 07:26:24 -0500
commit47a55cd795656d11bb18a7885583361f02a6baa8 (patch)
treef2b8d82fb7cf0710f9ec362fd4ca0e855612b81d /arch/i386/kernel/entry.S
parent2632f01a66d75f4ad59653a7efa506c6ea6845d0 (diff)
[PATCH] i386: entry.S END/ENDPROC annotations
Annotate i386/kernel/entry.S with END/ENDPROC to assist disassemblers and other analysis tools. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/entry.S')
-rw-r--r--arch/i386/kernel/entry.S41
1 files changed, 37 insertions, 4 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index d4b4ffc9eacb..18bddcb8e9e8 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -227,6 +227,7 @@ ENTRY(ret_from_fork)
227 CFI_ADJUST_CFA_OFFSET -4 227 CFI_ADJUST_CFA_OFFSET -4
228 jmp syscall_exit 228 jmp syscall_exit
229 CFI_ENDPROC 229 CFI_ENDPROC
230END(ret_from_fork)
230 231
231/* 232/*
232 * Return to user mode is not as complex as all this looks, 233 * Return to user mode is not as complex as all this looks,
@@ -258,6 +259,7 @@ ENTRY(resume_userspace)
258 # int/exception return? 259 # int/exception return?
259 jne work_pending 260 jne work_pending
260 jmp restore_all 261 jmp restore_all
262END(ret_from_exception)
261 263
262#ifdef CONFIG_PREEMPT 264#ifdef CONFIG_PREEMPT
263ENTRY(resume_kernel) 265ENTRY(resume_kernel)
@@ -272,6 +274,7 @@ need_resched:
272 jz restore_all 274 jz restore_all
273 call preempt_schedule_irq 275 call preempt_schedule_irq
274 jmp need_resched 276 jmp need_resched
277END(resume_kernel)
275#endif 278#endif
276 CFI_ENDPROC 279 CFI_ENDPROC
277 280
@@ -359,6 +362,7 @@ sysenter_past_esp:
359 .align 4 362 .align 4
360 .long 1b,2b 363 .long 1b,2b
361.popsection 364.popsection
365ENDPROC(sysenter_entry)
362 366
363 # system call handler stub 367 # system call handler stub
364ENTRY(system_call) 368ENTRY(system_call)
@@ -459,6 +463,7 @@ ldt_ss:
459 CFI_ADJUST_CFA_OFFSET -8 463 CFI_ADJUST_CFA_OFFSET -8
460 jmp restore_nocheck 464 jmp restore_nocheck
461 CFI_ENDPROC 465 CFI_ENDPROC
466ENDPROC(system_call)
462 467
463 # perform work that needs to be done immediately before resumption 468 # perform work that needs to be done immediately before resumption
464 ALIGN 469 ALIGN
@@ -504,6 +509,7 @@ work_notifysig_v86:
504 xorl %edx, %edx 509 xorl %edx, %edx
505 call do_notify_resume 510 call do_notify_resume
506 jmp resume_userspace_sig 511 jmp resume_userspace_sig
512END(work_pending)
507 513
508 # perform syscall exit tracing 514 # perform syscall exit tracing
509 ALIGN 515 ALIGN
@@ -519,6 +525,7 @@ syscall_trace_entry:
519 cmpl $(nr_syscalls), %eax 525 cmpl $(nr_syscalls), %eax
520 jnae syscall_call 526 jnae syscall_call
521 jmp syscall_exit 527 jmp syscall_exit
528END(syscall_trace_entry)
522 529
523 # perform syscall exit tracing 530 # perform syscall exit tracing
524 ALIGN 531 ALIGN
@@ -532,6 +539,7 @@ syscall_exit_work:
532 movl $1, %edx 539 movl $1, %edx
533 call do_syscall_trace 540 call do_syscall_trace
534 jmp resume_userspace 541 jmp resume_userspace
542END(syscall_exit_work)
535 CFI_ENDPROC 543 CFI_ENDPROC
536 544
537 RING0_INT_FRAME # can't unwind into user space anyway 545 RING0_INT_FRAME # can't unwind into user space anyway
@@ -542,10 +550,12 @@ syscall_fault:
542 GET_THREAD_INFO(%ebp) 550 GET_THREAD_INFO(%ebp)
543 movl $-EFAULT,PT_EAX(%esp) 551 movl $-EFAULT,PT_EAX(%esp)
544 jmp resume_userspace 552 jmp resume_userspace
553END(syscall_fault)
545 554
546syscall_badsys: 555syscall_badsys:
547 movl $-ENOSYS,PT_EAX(%esp) 556 movl $-ENOSYS,PT_EAX(%esp)
548 jmp resume_userspace 557 jmp resume_userspace
558END(syscall_badsys)
549 CFI_ENDPROC 559 CFI_ENDPROC
550 560
551#define FIXUP_ESPFIX_STACK \ 561#define FIXUP_ESPFIX_STACK \
@@ -581,9 +591,9 @@ syscall_badsys:
581ENTRY(interrupt) 591ENTRY(interrupt)
582.text 592.text
583 593
584vector=0
585ENTRY(irq_entries_start) 594ENTRY(irq_entries_start)
586 RING0_INT_FRAME 595 RING0_INT_FRAME
596vector=0
587.rept NR_IRQS 597.rept NR_IRQS
588 ALIGN 598 ALIGN
589 .if vector 599 .if vector
@@ -592,11 +602,16 @@ ENTRY(irq_entries_start)
5921: pushl $~(vector) 6021: pushl $~(vector)
593 CFI_ADJUST_CFA_OFFSET 4 603 CFI_ADJUST_CFA_OFFSET 4
594 jmp common_interrupt 604 jmp common_interrupt
595.data 605 .previous
596 .long 1b 606 .long 1b
597.text 607 .text
598vector=vector+1 608vector=vector+1
599.endr 609.endr
610END(irq_entries_start)
611
612.previous
613END(interrupt)
614.previous
600 615
601/* 616/*
602 * the CPU automatically disables interrupts when executing an IRQ vector, 617 * the CPU automatically disables interrupts when executing an IRQ vector,
@@ -609,6 +624,7 @@ common_interrupt:
609 movl %esp,%eax 624 movl %esp,%eax
610 call do_IRQ 625 call do_IRQ
611 jmp ret_from_intr 626 jmp ret_from_intr
627ENDPROC(common_interrupt)
612 CFI_ENDPROC 628 CFI_ENDPROC
613 629
614#define BUILD_INTERRUPT(name, nr) \ 630#define BUILD_INTERRUPT(name, nr) \
@@ -621,7 +637,8 @@ ENTRY(name) \
621 movl %esp,%eax; \ 637 movl %esp,%eax; \
622 call smp_/**/name; \ 638 call smp_/**/name; \
623 jmp ret_from_intr; \ 639 jmp ret_from_intr; \
624 CFI_ENDPROC 640 CFI_ENDPROC; \
641ENDPROC(name)
625 642
626/* The include is where all of the SMP etc. interrupts come from */ 643/* The include is where all of the SMP etc. interrupts come from */
627#include "entry_arch.h" 644#include "entry_arch.h"
@@ -697,6 +714,7 @@ ENTRY(coprocessor_error)
697 CFI_ADJUST_CFA_OFFSET 4 714 CFI_ADJUST_CFA_OFFSET 4
698 jmp error_code 715 jmp error_code
699 CFI_ENDPROC 716 CFI_ENDPROC
717END(coprocessor_error)
700 718
701ENTRY(simd_coprocessor_error) 719ENTRY(simd_coprocessor_error)
702 RING0_INT_FRAME 720 RING0_INT_FRAME
@@ -706,6 +724,7 @@ ENTRY(simd_coprocessor_error)
706 CFI_ADJUST_CFA_OFFSET 4 724 CFI_ADJUST_CFA_OFFSET 4
707 jmp error_code 725 jmp error_code
708 CFI_ENDPROC 726 CFI_ENDPROC
727END(simd_coprocessor_error)
709 728
710ENTRY(device_not_available) 729ENTRY(device_not_available)
711 RING0_INT_FRAME 730 RING0_INT_FRAME
@@ -726,6 +745,7 @@ device_not_available_emulate:
726 CFI_ADJUST_CFA_OFFSET -4 745 CFI_ADJUST_CFA_OFFSET -4
727 jmp ret_from_exception 746 jmp ret_from_exception
728 CFI_ENDPROC 747 CFI_ENDPROC
748END(device_not_available)
729 749
730/* 750/*
731 * Debug traps and NMI can happen at the one SYSENTER instruction 751 * Debug traps and NMI can happen at the one SYSENTER instruction
@@ -869,10 +889,12 @@ ENTRY(native_iret)
869 .align 4 889 .align 4
870 .long 1b,iret_exc 890 .long 1b,iret_exc
871.previous 891.previous
892END(native_iret)
872 893
873ENTRY(native_irq_enable_sysexit) 894ENTRY(native_irq_enable_sysexit)
874 sti 895 sti
875 sysexit 896 sysexit
897END(native_irq_enable_sysexit)
876#endif 898#endif
877 899
878KPROBE_ENTRY(int3) 900KPROBE_ENTRY(int3)
@@ -895,6 +917,7 @@ ENTRY(overflow)
895 CFI_ADJUST_CFA_OFFSET 4 917 CFI_ADJUST_CFA_OFFSET 4
896 jmp error_code 918 jmp error_code
897 CFI_ENDPROC 919 CFI_ENDPROC
920END(overflow)
898 921
899ENTRY(bounds) 922ENTRY(bounds)
900 RING0_INT_FRAME 923 RING0_INT_FRAME
@@ -904,6 +927,7 @@ ENTRY(bounds)
904 CFI_ADJUST_CFA_OFFSET 4 927 CFI_ADJUST_CFA_OFFSET 4
905 jmp error_code 928 jmp error_code
906 CFI_ENDPROC 929 CFI_ENDPROC
930END(bounds)
907 931
908ENTRY(invalid_op) 932ENTRY(invalid_op)
909 RING0_INT_FRAME 933 RING0_INT_FRAME
@@ -913,6 +937,7 @@ ENTRY(invalid_op)
913 CFI_ADJUST_CFA_OFFSET 4 937 CFI_ADJUST_CFA_OFFSET 4
914 jmp error_code 938 jmp error_code
915 CFI_ENDPROC 939 CFI_ENDPROC
940END(invalid_op)
916 941
917ENTRY(coprocessor_segment_overrun) 942ENTRY(coprocessor_segment_overrun)
918 RING0_INT_FRAME 943 RING0_INT_FRAME
@@ -922,6 +947,7 @@ ENTRY(coprocessor_segment_overrun)
922 CFI_ADJUST_CFA_OFFSET 4 947 CFI_ADJUST_CFA_OFFSET 4
923 jmp error_code 948 jmp error_code
924 CFI_ENDPROC 949 CFI_ENDPROC
950END(coprocessor_segment_overrun)
925 951
926ENTRY(invalid_TSS) 952ENTRY(invalid_TSS)
927 RING0_EC_FRAME 953 RING0_EC_FRAME
@@ -929,6 +955,7 @@ ENTRY(invalid_TSS)
929 CFI_ADJUST_CFA_OFFSET 4 955 CFI_ADJUST_CFA_OFFSET 4
930 jmp error_code 956 jmp error_code
931 CFI_ENDPROC 957 CFI_ENDPROC
958END(invalid_TSS)
932 959
933ENTRY(segment_not_present) 960ENTRY(segment_not_present)
934 RING0_EC_FRAME 961 RING0_EC_FRAME
@@ -936,6 +963,7 @@ ENTRY(segment_not_present)
936 CFI_ADJUST_CFA_OFFSET 4 963 CFI_ADJUST_CFA_OFFSET 4
937 jmp error_code 964 jmp error_code
938 CFI_ENDPROC 965 CFI_ENDPROC
966END(segment_not_present)
939 967
940ENTRY(stack_segment) 968ENTRY(stack_segment)
941 RING0_EC_FRAME 969 RING0_EC_FRAME
@@ -943,6 +971,7 @@ ENTRY(stack_segment)
943 CFI_ADJUST_CFA_OFFSET 4 971 CFI_ADJUST_CFA_OFFSET 4
944 jmp error_code 972 jmp error_code
945 CFI_ENDPROC 973 CFI_ENDPROC
974END(stack_segment)
946 975
947KPROBE_ENTRY(general_protection) 976KPROBE_ENTRY(general_protection)
948 RING0_EC_FRAME 977 RING0_EC_FRAME
@@ -958,6 +987,7 @@ ENTRY(alignment_check)
958 CFI_ADJUST_CFA_OFFSET 4 987 CFI_ADJUST_CFA_OFFSET 4
959 jmp error_code 988 jmp error_code
960 CFI_ENDPROC 989 CFI_ENDPROC
990END(alignment_check)
961 991
962ENTRY(divide_error) 992ENTRY(divide_error)
963 RING0_INT_FRAME 993 RING0_INT_FRAME
@@ -967,6 +997,7 @@ ENTRY(divide_error)
967 CFI_ADJUST_CFA_OFFSET 4 997 CFI_ADJUST_CFA_OFFSET 4
968 jmp error_code 998 jmp error_code
969 CFI_ENDPROC 999 CFI_ENDPROC
1000END(divide_error)
970 1001
971#ifdef CONFIG_X86_MCE 1002#ifdef CONFIG_X86_MCE
972ENTRY(machine_check) 1003ENTRY(machine_check)
@@ -977,6 +1008,7 @@ ENTRY(machine_check)
977 CFI_ADJUST_CFA_OFFSET 4 1008 CFI_ADJUST_CFA_OFFSET 4
978 jmp error_code 1009 jmp error_code
979 CFI_ENDPROC 1010 CFI_ENDPROC
1011END(machine_check)
980#endif 1012#endif
981 1013
982ENTRY(spurious_interrupt_bug) 1014ENTRY(spurious_interrupt_bug)
@@ -987,6 +1019,7 @@ ENTRY(spurious_interrupt_bug)
987 CFI_ADJUST_CFA_OFFSET 4 1019 CFI_ADJUST_CFA_OFFSET 4
988 jmp error_code 1020 jmp error_code
989 CFI_ENDPROC 1021 CFI_ENDPROC
1022END(spurious_interrupt_bug)
990 1023
991ENTRY(kernel_thread_helper) 1024ENTRY(kernel_thread_helper)
992 pushl $0 # fake return address for unwinder 1025 pushl $0 # fake return address for unwinder