diff options
Diffstat (limited to 'arch/x86/mm/pageattr.c')
| -rw-r--r-- | arch/x86/mm/pageattr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index a718e0d23503..931930a96160 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
| @@ -919,11 +919,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, | |||
| 919 | 919 | ||
| 920 | /* | 920 | /* |
| 921 | * On success we use clflush, when the CPU supports it to | 921 | * On success we use clflush, when the CPU supports it to |
| 922 | * avoid the wbindv. If the CPU does not support it and in the | 922 | * avoid the wbindv. If the CPU does not support it, in the |
| 923 | * error case we fall back to cpa_flush_all (which uses | 923 | * error case, and during early boot (for EFI) we fall back |
| 924 | * wbindv): | 924 | * to cpa_flush_all (which uses wbinvd): |
| 925 | */ | 925 | */ |
| 926 | if (!ret && cpu_has_clflush) { | 926 | if (early_boot_irqs_disabled) |
| 927 | __cpa_flush_all((void *)(long)cache); | ||
| 928 | else if (!ret && cpu_has_clflush) { | ||
| 927 | if (cpa.flags & (CPA_PAGES_ARRAY | CPA_ARRAY)) { | 929 | if (cpa.flags & (CPA_PAGES_ARRAY | CPA_ARRAY)) { |
| 928 | cpa_flush_array(addr, numpages, cache, | 930 | cpa_flush_array(addr, numpages, cache, |
| 929 | cpa.flags, pages); | 931 | cpa.flags, pages); |
