diff options
-rw-r--r-- | arch/x86/mm/pageattr.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index b6a4c638f086..bd9b0ac07352 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -319,26 +319,12 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache, | |||
319 | int in_flags, struct page **pages) | 319 | int in_flags, struct page **pages) |
320 | { | 320 | { |
321 | unsigned int i, level; | 321 | unsigned int i, level; |
322 | #ifdef CONFIG_PREEMPT | ||
323 | /* | ||
324 | * Avoid wbinvd() because it causes latencies on all CPUs, | ||
325 | * regardless of any CPU isolation that may be in effect. | ||
326 | * | ||
327 | * This should be extended for CAT enabled systems independent of | ||
328 | * PREEMPT because wbinvd() does not respect the CAT partitions and | ||
329 | * this is exposed to unpriviledged users through the graphics | ||
330 | * subsystem. | ||
331 | */ | ||
332 | unsigned long do_wbinvd = 0; | ||
333 | #else | ||
334 | unsigned long do_wbinvd = cache && numpages >= 1024; /* 4M threshold */ | ||
335 | #endif | ||
336 | 322 | ||
337 | BUG_ON(irqs_disabled() && !early_boot_irqs_disabled); | 323 | BUG_ON(irqs_disabled() && !early_boot_irqs_disabled); |
338 | 324 | ||
339 | on_each_cpu(__cpa_flush_all, (void *) do_wbinvd, 1); | 325 | flush_tlb_all(); |
340 | 326 | ||
341 | if (!cache || do_wbinvd) | 327 | if (!cache) |
342 | return; | 328 | return; |
343 | 329 | ||
344 | /* | 330 | /* |