Skip to content

Commit 5927145

Browse files
Christoph HellwigIngo Molnar
authored andcommitted
x86/cpu: Remove the CONFIG_X86_PPRO_FENCE=y quirk
There were only a few Pentium Pro multiprocessors systems where this errata applied. They are more than 20 years old now, and we've slowly dropped places which put the workarounds in and discouraged anyone from enabling the workaround. Get rid of it for good. Tested-by: Tom Lendacky <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Jon Mason <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Muli Ben-Yehuda <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent c55b855 commit 5927145

File tree

6 files changed

+0
-83
lines changed

6 files changed

+0
-83
lines changed

arch/x86/Kconfig.cpu

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -315,19 +315,6 @@ config X86_L1_CACHE_SHIFT
315315
default "4" if MELAN || M486 || MGEODEGX1
316316
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
317317

318-
config X86_PPRO_FENCE
319-
bool "PentiumPro memory ordering errata workaround"
320-
depends on M686 || M586MMX || M586TSC || M586 || M486 || MGEODEGX1
321-
---help---
322-
Old PentiumPro multiprocessor systems had errata that could cause
323-
memory operations to violate the x86 ordering standard in rare cases.
324-
Enabling this option will attempt to work around some (but not all)
325-
occurrences of this problem, at the cost of much heavier spinlock and
326-
memory barrier operations.
327-
328-
If unsure, say n here. Even distro kernels should think twice before
329-
enabling this: there are few systems, and an unlikely bug.
330-
331318
config X86_F00F_BUG
332319
def_bool y
333320
depends on M586MMX || M586TSC || M586 || M486

arch/x86/entry/vdso/vdso32/vclock_gettime.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#undef CONFIG_OPTIMIZE_INLINING
66
#endif
77

8-
#undef CONFIG_X86_PPRO_FENCE
9-
108
#ifdef CONFIG_X86_64
119

1210
/*

arch/x86/include/asm/barrier.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,
5252
#define barrier_nospec() alternative_2("", "mfence", X86_FEATURE_MFENCE_RDTSC, \
5353
"lfence", X86_FEATURE_LFENCE_RDTSC)
5454

55-
#ifdef CONFIG_X86_PPRO_FENCE
56-
#define dma_rmb() rmb()
57-
#else
5855
#define dma_rmb() barrier()
59-
#endif
6056
#define dma_wmb() barrier()
6157

6258
#ifdef CONFIG_X86_32
@@ -68,30 +64,6 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,
6864
#define __smp_wmb() barrier()
6965
#define __smp_store_mb(var, value) do { (void)xchg(&var, value); } while (0)
7066

71-
#if defined(CONFIG_X86_PPRO_FENCE)
72-
73-
/*
74-
* For this option x86 doesn't have a strong TSO memory
75-
* model and we should fall back to full barriers.
76-
*/
77-
78-
#define __smp_store_release(p, v) \
79-
do { \
80-
compiletime_assert_atomic_type(*p); \
81-
__smp_mb(); \
82-
WRITE_ONCE(*p, v); \
83-
} while (0)
84-
85-
#define __smp_load_acquire(p) \
86-
({ \
87-
typeof(*p) ___p1 = READ_ONCE(*p); \
88-
compiletime_assert_atomic_type(*p); \
89-
__smp_mb(); \
90-
___p1; \
91-
})
92-
93-
#else /* regular x86 TSO memory ordering */
94-
9567
#define __smp_store_release(p, v) \
9668
do { \
9769
compiletime_assert_atomic_type(*p); \
@@ -107,8 +79,6 @@ do { \
10779
___p1; \
10880
})
10981

110-
#endif
111-
11282
/* Atomic operations are already serializing on x86 */
11383
#define __smp_mb__before_atomic() barrier()
11484
#define __smp_mb__after_atomic() barrier()

arch/x86/include/asm/io.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -232,21 +232,6 @@ extern void set_iounmap_nonlazy(void);
232232
*/
233233
#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET))
234234

235-
/*
236-
* Cache management
237-
*
238-
* This needed for two cases
239-
* 1. Out of order aware processors
240-
* 2. Accidentally out of order processors (PPro errata #51)
241-
*/
242-
243-
static inline void flush_write_buffers(void)
244-
{
245-
#if defined(CONFIG_X86_PPRO_FENCE)
246-
asm volatile("lock; addl $0,0(%%esp)": : :"memory");
247-
#endif
248-
}
249-
250235
#endif /* __KERNEL__ */
251236

252237
extern void native_io_delay(void);

arch/x86/kernel/pci-nommu.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ static dma_addr_t nommu_map_page(struct device *dev, struct page *page,
3737
WARN_ON(size == 0);
3838
if (!check_addr("map_single", dev, bus, size))
3939
return NOMMU_MAPPING_ERROR;
40-
flush_write_buffers();
4140
return bus;
4241
}
4342

@@ -72,25 +71,9 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
7271
return 0;
7372
s->dma_length = s->length;
7473
}
75-
flush_write_buffers();
7674
return nents;
7775
}
7876

79-
static void nommu_sync_single_for_device(struct device *dev,
80-
dma_addr_t addr, size_t size,
81-
enum dma_data_direction dir)
82-
{
83-
flush_write_buffers();
84-
}
85-
86-
87-
static void nommu_sync_sg_for_device(struct device *dev,
88-
struct scatterlist *sg, int nelems,
89-
enum dma_data_direction dir)
90-
{
91-
flush_write_buffers();
92-
}
93-
9477
static int nommu_mapping_error(struct device *dev, dma_addr_t dma_addr)
9578
{
9679
return dma_addr == NOMMU_MAPPING_ERROR;
@@ -101,8 +84,6 @@ const struct dma_map_ops nommu_dma_ops = {
10184
.free = dma_generic_free_coherent,
10285
.map_sg = nommu_map_sg,
10386
.map_page = nommu_map_page,
104-
.sync_single_for_device = nommu_sync_single_for_device,
105-
.sync_sg_for_device = nommu_sync_sg_for_device,
10687
.is_phys = 1,
10788
.mapping_error = nommu_mapping_error,
10889
.dma_supported = x86_dma_supported,

arch/x86/um/asm/barrier.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@
3030

3131
#endif /* CONFIG_X86_32 */
3232

33-
#ifdef CONFIG_X86_PPRO_FENCE
34-
#define dma_rmb() rmb()
35-
#else /* CONFIG_X86_PPRO_FENCE */
3633
#define dma_rmb() barrier()
37-
#endif /* CONFIG_X86_PPRO_FENCE */
3834
#define dma_wmb() barrier()
3935

4036
#include <asm-generic/barrier.h>

0 commit comments

Comments
 (0)