summaryrefslogtreecommitdiffstats
path: root/sys/arm64/include/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm64/include/cpu.h')
-rw-r--r--sys/arm64/include/cpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
index 8f14e82..520729c 100644
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 2014 The FreeBSD Foundation
+ * Copyright (c) 2014-2016 The FreeBSD Foundation
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
@@ -46,7 +46,7 @@
#include <machine/armreg.h>
#define TRAPF_PC(tfp) ((tfp)->tf_lr)
-#define TRAPF_USERMODE(tfp) (((tfp)->tf_elr & (1ul << 63)) == 0)
+#define TRAPF_USERMODE(tfp) (((tfp)->tf_spsr & PSR_M_MASK) == PSR_M_EL0t)
#define cpu_getstack(td) ((td)->td_frame->tf_sp)
#define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp))
OpenPOWER on IntegriCloud