Commit 43b138da authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] M386 flush_one_tlb invlpg

CONFIG_M386 kernel running on PPro+ processor with X86_FEATURE_PGE may
set _PAGE_GLOBAL bit: then __flush_tlb_one must use invlpg instruction.
H. J. Lu reports (LKML 8 Sept) that his P4 reboots due to this problem.
parent 49ba178c
...@@ -45,11 +45,21 @@ extern unsigned long pgkern_mask; ...@@ -45,11 +45,21 @@ extern unsigned long pgkern_mask;
__flush_tlb(); \ __flush_tlb(); \
} while (0) } while (0)
#ifndef CONFIG_X86_INVLPG #define cpu_has_invlpg (boot_cpu_data.x86 > 3)
#define __flush_tlb_one(addr) __flush_tlb()
#define __flush_tlb_single(addr) \
__asm__ __volatile__("invlpg %0": :"m" (*(char *) addr))
#ifdef CONFIG_X86_INVLPG
# define __flush_tlb_one(addr) __flush_tlb_single(addr)
#else #else
#define __flush_tlb_one(addr) \ # define __flush_tlb_one(addr) \
__asm__ __volatile__("invlpg %0": :"m" (*(char *) addr)) do { \
if (cpu_has_invlpg) \
__flush_tlb_single(addr); \
else \
__flush_tlb(); \
} while (0)
#endif #endif
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment