]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86, 386 removal: Remove CONFIG_INVLPG
authorH. Peter Anvin <hpa@linux.intel.com>
Wed, 28 Nov 2012 19:50:27 +0000 (11:50 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 29 Nov 2012 21:23:02 +0000 (13:23 -0800)
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
arch/x86/Kconfig.cpu
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/tlbflush.h
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/intel.c
arch/x86/mm/tlb.c

index 8e5867cf07d0d1195552e9ee8908fc8ac9f9fa53..d3bdc18af1f0a4ce565632a157cd4ee7e880222c 100644 (file)
@@ -328,10 +328,6 @@ config X86_INVD_BUG
 config X86_WP_WORKS_OK
        def_bool y
 
-config X86_INVLPG
-       def_bool y
-       depends on X86_32
-
 config X86_POPAD_OK
        def_bool y
        depends on X86_32
index 8c297aa53eef1cdcc8de35d058ae7b0b933f5dbb..ff8dd62fda482e7d22f13c686a17ce799991732f 100644 (file)
@@ -312,12 +312,6 @@ extern const char * const x86_power_flags[32];
 #define cpu_has_cx16           boot_cpu_has(X86_FEATURE_CX16)
 #define cpu_has_eager_fpu      boot_cpu_has(X86_FEATURE_EAGER_FPU)
 
-#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
-# define cpu_has_invlpg                1
-#else
-# define cpu_has_invlpg                (boot_cpu_data.x86 > 3)
-#endif
-
 #ifdef CONFIG_X86_64
 
 #undef  cpu_has_vme
index 74a44333545ab6fdf8a71b38c573ff78a37e6661..0fee48e279cc6659c059acfe1dbc8a42047603e4 100644 (file)
@@ -56,10 +56,7 @@ static inline void __flush_tlb_all(void)
 
 static inline void __flush_tlb_one(unsigned long addr)
 {
-       if (cpu_has_invlpg)
                __flush_tlb_single(addr);
-       else
-               __flush_tlb();
 }
 
 #define TLB_FLUSH_ALL  -1UL
index 1b7d1656a042ff5e1886c6fff40bbde1ff3a472d..a025d8cc4577e31297f99cdbaef4ada61e9001d5 100644 (file)
@@ -753,9 +753,6 @@ static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c,
 
 static void __cpuinit cpu_set_tlb_flushall_shift(struct cpuinfo_x86 *c)
 {
-       if (!cpu_has_invlpg)
-               return;
-
        tlb_flushall_shift = 5;
 
        if (c->x86 <= 0x11)
index 198e019a531af8f26c9c094560d87b325998428b..fcaabd0432c5dda0fa5e3c8f8b37473ee177c1d8 100644 (file)
@@ -612,10 +612,6 @@ static void __cpuinit intel_tlb_lookup(const unsigned char desc)
 
 static void __cpuinit intel_tlb_flushall_shift_set(struct cpuinfo_x86 *c)
 {
-       if (!cpu_has_invlpg) {
-               tlb_flushall_shift = -1;
-               return;
-       }
        switch ((c->x86 << 8) + c->x86_model) {
        case 0x60f: /* original 65 nm celeron/pentium/core2/xeon, "Merom"/"Conroe" */
        case 0x616: /* single-core 65 nm celeron/core2solo "Merom-L"/"Conroe-L" */
index 60f926cd8b0edbf44277a18718dd86cb4a077bd1..13a6b29e2e5d27041bc5657dd3263302d75b9547 100644 (file)
@@ -104,7 +104,7 @@ static void flush_tlb_func(void *info)
                return;
 
        if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK) {
-               if (f->flush_end == TLB_FLUSH_ALL || !cpu_has_invlpg)
+               if (f->flush_end == TLB_FLUSH_ALL)
                        local_flush_tlb();
                else if (!f->flush_end)
                        __flush_tlb_single(f->flush_start);
@@ -337,10 +337,8 @@ static const struct file_operations fops_tlbflush = {
 
 static int __cpuinit create_tlb_flushall_shift(void)
 {
-       if (cpu_has_invlpg) {
-               debugfs_create_file("tlb_flushall_shift", S_IRUSR | S_IWUSR,
-                       arch_debugfs_dir, NULL, &fops_tlbflush);
-       }
+       debugfs_create_file("tlb_flushall_shift", S_IRUSR | S_IWUSR,
+                           arch_debugfs_dir, NULL, &fops_tlbflush);
        return 0;
 }
 late_initcall(create_tlb_flushall_shift);