1 /* 2 * linux/mm/page.s 3 * 4 * (C) 1991 Linus Torvalds 5 */ 6 7 /* 8 * page.s contains the low-level page-exception code. 9 * the real work is done in mm.c 10 */ 11 12 .globl _page_fault 13 14 _page_fault: 15 xchgl %eax,(%esp) 16 pushl %ecx 17 pushl %edx 18 push %ds 19 push %es 20 push %fs 21 movl $0x10,%edx 22 mov %dx,%ds 23 mov %dx,%es 24 mov %dx,%fs 25 movl %cr2,%edx 26 pushl %edx 27 pushl %eax 28 testl $1,%eax 29 jne 1f 30 call _do_no_page 31 jmp 2f 32 1: call _do_wp_page 33 2: addl $8,%esp 34 pop %fs 35 pop %es 36 pop %ds 37 popl %edx 38 popl %ecx 39 popl %eax 40 iret