#include <asm/system.h>
#include <asm/uaccess.h>
-#include <asm/hardirq.h>
#include <asm/desc.h>
+#include <asm/kdebug.h>
extern void die(const char *,struct pt_regs *,long);
desc = (void *)desc + (seg & ~7);
} else {
/* Must disable preemption while reading the GDT. */
- desc = (u32 *)&cpu_gdt_table[get_cpu()];
+ desc = (u32 *)&per_cpu(cpu_gdt_table, get_cpu());
desc = (void *)desc + (seg & ~7);
}
/* get the address */
__asm__("movl %%cr2,%0":"=r" (address));
+ if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
+ SIGSEGV) == NOTIFY_STOP)
+ return;
/* It's safe to allow irq's after cr2 has been saved */
if (regs->eflags & (X86_EFLAGS_IF|VM_MASK))
local_irq_enable();
* an interrupt in the middle of a task switch..
*/
int index = pgd_index(address);
+ unsigned long pgd_paddr;
pgd_t *pgd, *pgd_k;
pmd_t *pmd, *pmd_k;
pte_t *pte_k;
- asm("movl %%cr3,%0":"=r" (pgd));
- pgd = index + (pgd_t *)__va(pgd);
+ asm("movl %%cr3,%0":"=r" (pgd_paddr));
+ pgd = index + (pgd_t *)__va(pgd_paddr);
pgd_k = init_mm.pgd + index;
if (!pgd_present(*pgd_k))