Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[sfrench/cifs-2.6.git] / arch / arm64 / include / asm / efi.h
index c4cd5081d78bc4b66e34f3c283d9b1f6ba48518c..8389050328bba2c272b2fe7c6818083ff206d908 100644 (file)
@@ -121,19 +121,21 @@ static inline void efi_set_pgd(struct mm_struct *mm)
                if (mm != current->active_mm) {
                        /*
                         * Update the current thread's saved ttbr0 since it is
-                        * restored as part of a return from exception. Set
-                        * the hardware TTBR0_EL1 using cpu_switch_mm()
-                        * directly to enable potential errata workarounds.
+                        * restored as part of a return from exception. Enable
+                        * access to the valid TTBR0_EL1 and invoke the errata
+                        * workaround directly since there is no return from
+                        * exception when invoking the EFI run-time services.
                         */
                        update_saved_ttbr0(current, mm);
-                       cpu_switch_mm(mm->pgd, mm);
+                       uaccess_ttbr0_enable();
+                       post_ttbr_update_workaround();
                } else {
                        /*
                         * Defer the switch to the current thread's TTBR0_EL1
                         * until uaccess_enable(). Restore the current
                         * thread's saved ttbr0 corresponding to its active_mm
                         */
-                       cpu_set_reserved_ttbr0();
+                       uaccess_ttbr0_disable();
                        update_saved_ttbr0(current, current->active_mm);
                }
        }