x86: optimise x86's do_page_fault (C entry point for the page fault path)
[linux-2.6.git] / arch / ia64 / ia32 / ia32_support.c
index 4f63004..a6965dd 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mm.h>
-#include <linux/personality.h>
 #include <linux/sched.h>
 
 #include <asm/intrinsics.h>
@@ -27,9 +26,8 @@
 
 #include "ia32priv.h"
 
-extern void die_if_kernel (char *str, struct pt_regs *regs, long err);
+extern int die_if_kernel (char *str, struct pt_regs *regs, long err);
 
-struct exec_domain ia32_exec_domain;
 struct page *ia32_shared_page[NR_CPUS];
 unsigned long *ia32_boot_gdt;
 unsigned long *cpu_gdt_table[NR_CPUS];
@@ -58,7 +56,7 @@ load_desc (u16 selector)
 void
 ia32_load_segment_descriptors (struct task_struct *task)
 {
-       struct pt_regs *regs = ia64_task_regs(task);
+       struct pt_regs *regs = task_pt_regs(task);
 
        /* Setup the segment descriptors */
        regs->r24 = load_desc(regs->r16 >> 16);         /* ESD */
@@ -113,7 +111,7 @@ void
 ia32_load_state (struct task_struct *t)
 {
        unsigned long eflag, fsr, fcr, fir, fdr, tssd;
-       struct pt_regs *regs = ia64_task_regs(t);
+       struct pt_regs *regs = task_pt_regs(t);
 
        eflag = t->thread.eflag;
        fsr = t->thread.fsr;
@@ -217,7 +215,8 @@ ia32_bad_interrupt (unsigned long int_num, struct pt_regs *regs)
 {
        siginfo_t siginfo;
 
-       die_if_kernel("Bad IA-32 interrupt", regs, int_num);
+       if (die_if_kernel("Bad IA-32 interrupt", regs, int_num))
+               return;
 
        siginfo.si_signo = SIGTRAP;
        siginfo.si_errno = int_num;     /* XXX is it OK to abuse si_errno like this? */
@@ -239,23 +238,13 @@ ia32_cpu_init (void)
 static int __init
 ia32_init (void)
 {
-       ia32_exec_domain.name = "Linux/x86";
-       ia32_exec_domain.handler = NULL;
-       ia32_exec_domain.pers_low = PER_LINUX32;
-       ia32_exec_domain.pers_high = PER_LINUX32;
-       ia32_exec_domain.signal_map = default_exec_domain.signal_map;
-       ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
-       register_exec_domain(&ia32_exec_domain);
-
 #if PAGE_SHIFT > IA32_PAGE_SHIFT
        {
-               extern kmem_cache_t *partial_page_cachep;
+               extern struct kmem_cache *ia64_partial_page_cachep;
 
-               partial_page_cachep = kmem_cache_create("partial_page_cache",
-                                                       sizeof(struct partial_page), 0, 0,
-                                                       NULL, NULL);
-               if (!partial_page_cachep)
-                       panic("Cannot create partial page SLAB cache");
+               ia64_partial_page_cachep = kmem_cache_create("ia64_partial_page_cache",
+                                       sizeof(struct ia64_partial_page),
+                                       0, SLAB_PANIC, NULL);
        }
 #endif
        return 0;