diff -urN 2.4.19pre3aa2/arch/i386/kernel/traps.c f00f/arch/i386/kernel/traps.c --- 2.4.19pre3aa2/arch/i386/kernel/traps.c Wed Mar 13 18:51:04 2002 +++ f00f/arch/i386/kernel/traps.c Wed Mar 13 18:55:52 2002 @@ -724,33 +724,18 @@ #ifndef CONFIG_M686 void __init trap_init_f00f_bug(void) { - unsigned long page; - pgd_t * pgd; - pmd_t * pmd; - pte_t * pte; - /* * Allocate a new page in virtual address space, * move the IDT into it and write protect this page. */ - page = (unsigned long) vmalloc(PAGE_SIZE); - pgd = pgd_offset(&init_mm, page); - pmd = pmd_offset(pgd, page); - pte = pte_offset(pmd, page); - __free_page(pte_page(*pte)); - *pte = mk_pte_phys(__pa(&idt_table), PAGE_KERNEL_RO); - pte_kunmap(pte); - /* - * Not that any PGE-capable kernel should have the f00f bug ... - */ - __flush_tlb_all(); + __set_fixmap(FIX_F00F, __pa(&idt_table), PAGE_KERNEL_RO); /* * "idt" is magic - it overlaps the idt_descr * variable so that updating idt will automatically * update the idt descriptor.. */ - idt = (struct desc_struct *)page; + idt = (struct desc_struct *) __fix_to_virt(FIX_F00F); __asm__ __volatile__("lidt %0": "=m" (idt_descr)); } #endif diff -urN 2.4.19pre3aa2/include/asm-i386/fixmap.h f00f/include/asm-i386/fixmap.h --- 2.4.19pre3aa2/include/asm-i386/fixmap.h Wed Mar 13 18:51:04 2002 +++ f00f/include/asm-i386/fixmap.h Wed Mar 13 18:55:52 2002 @@ -61,6 +61,9 @@ FIX_LI_PCIA, /* Lithium PCI Bridge A */ FIX_LI_PCIB, /* Lithium PCI Bridge B */ #endif +#ifndef CONFIG_M686 + FIX_F00F, +#endif #ifdef CONFIG_HIGHMEM FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,