Skip to content

Commit 094ab1d

Browse files
author
H. Peter Anvin
committed
x86, 386 removal: Remove CONFIG_INVLPG
All 486+ CPUs support INVLPG, so remove the fallback 386 support code. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/1354132230-21854-6-git-send-email-hpa@linux.intel.com
1 parent e5bb8ad commit 094ab1d

6 files changed

Lines changed: 3 additions & 25 deletions

File tree

‎arch/x86/Kconfig.cpu‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,6 @@ config X86_INVD_BUG
328328
config X86_WP_WORKS_OK
329329
def_bool y
330330

331-
config X86_INVLPG
332-
def_bool y
333-
depends on X86_32
334-
335331
config X86_POPAD_OK
336332
def_bool y
337333
depends on X86_32

‎arch/x86/include/asm/cpufeature.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,6 @@ extern const char * const x86_power_flags[32];
312312
#define cpu_has_cx16 boot_cpu_has(X86_FEATURE_CX16)
313313
#define cpu_has_eager_fpu boot_cpu_has(X86_FEATURE_EAGER_FPU)
314314

315-
#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
316-
# define cpu_has_invlpg 1
317-
#else
318-
# define cpu_has_invlpg (boot_cpu_data.x86 > 3)
319-
#endif
320-
321315
#ifdef CONFIG_X86_64
322316

323317
#undef cpu_has_vme

‎arch/x86/include/asm/tlbflush.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ static inline void __flush_tlb_all(void)
5656

5757
static inline void __flush_tlb_one(unsigned long addr)
5858
{
59-
if (cpu_has_invlpg)
6059
__flush_tlb_single(addr);
61-
else
62-
__flush_tlb();
6360
}
6461

6562
#define TLB_FLUSH_ALL -1UL

‎arch/x86/kernel/cpu/amd.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,6 @@ static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c,
753753

754754
static void __cpuinit cpu_set_tlb_flushall_shift(struct cpuinfo_x86 *c)
755755
{
756-
if (!cpu_has_invlpg)
757-
return;
758-
759756
tlb_flushall_shift = 5;
760757

761758
if (c->x86 <= 0x11)

‎arch/x86/kernel/cpu/intel.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,10 +612,6 @@ static void __cpuinit intel_tlb_lookup(const unsigned char desc)
612612

613613
static void __cpuinit intel_tlb_flushall_shift_set(struct cpuinfo_x86 *c)
614614
{
615-
if (!cpu_has_invlpg) {
616-
tlb_flushall_shift = -1;
617-
return;
618-
}
619615
switch ((c->x86 << 8) + c->x86_model) {
620616
case 0x60f: /* original 65 nm celeron/pentium/core2/xeon, "Merom"/"Conroe" */
621617
case 0x616: /* single-core 65 nm celeron/core2solo "Merom-L"/"Conroe-L" */

‎arch/x86/mm/tlb.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static void flush_tlb_func(void *info)
104104
return;
105105

106106
if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK) {
107-
if (f->flush_end == TLB_FLUSH_ALL || !cpu_has_invlpg)
107+
if (f->flush_end == TLB_FLUSH_ALL)
108108
local_flush_tlb();
109109
else if (!f->flush_end)
110110
__flush_tlb_single(f->flush_start);
@@ -337,10 +337,8 @@ static const struct file_operations fops_tlbflush = {
337337

338338
static int __cpuinit create_tlb_flushall_shift(void)
339339
{
340-
if (cpu_has_invlpg) {
341-
debugfs_create_file("tlb_flushall_shift", S_IRUSR | S_IWUSR,
342-
arch_debugfs_dir, NULL, &fops_tlbflush);
343-
}
340+
debugfs_create_file("tlb_flushall_shift", S_IRUSR | S_IWUSR,
341+
arch_debugfs_dir, NULL, &fops_tlbflush);
344342
return 0;
345343
}
346344
late_initcall(create_tlb_flushall_shift);

0 commit comments

Comments
 (0)