summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/suspend.c
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2018-01-08 15:38:11 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2018-01-13 10:45:10 +0000
commite1281f56f114f3a945bf9ec30698bd3caa59d322 (patch)
tree7f0ba9927a35325d2de07f223ba04f634f5f7b12 /arch/arm64/kernel/suspend.c
parented8b20d457d72e9e2a30533b436fdb4ea1c70b38 (diff)
arm64: uaccess: Add PAN helper
Add __uaccess_{en,dis}able_hw_pan() helpers to set/clear the PSTATE.PAN bit. Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/suspend.c')
-rw-r--r--arch/arm64/kernel/suspend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/suspend.c b/arch/arm64/kernel/suspend.c
index 3fe5ad884418..a307b9e13392 100644
--- a/arch/arm64/kernel/suspend.c
+++ b/arch/arm64/kernel/suspend.c
@@ -2,6 +2,7 @@
#include <linux/ftrace.h>
#include <linux/percpu.h>
#include <linux/slab.h>
+#include <linux/uaccess.h>
#include <asm/alternative.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>
@@ -51,8 +52,7 @@ void notrace __cpu_suspend_exit(void)
* PSTATE was not saved over suspend/resume, re-enable any detected
* features that might not have been set correctly.
*/
- asm(ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN,
- CONFIG_ARM64_PAN));
+ __uaccess_enable_hw_pan();
uao_thread_switch(current);
/*