summaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/stack.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:45:52 -0400
committerChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:45:52 -0400
commit051168df528fe4456d63f5f65b041c147c26fe97 (patch)
tree789109ca42db49bf4d8c0c2794cf55659a171a39 /arch/tile/kernel/stack.c
parent309272f99f3e65b9bb5c49a2901c63a1859172f3 (diff)
downloadlinux-051168df528fe4456d63f5f65b041c147c26fe97.tar.bz2
tile: don't assume user privilege is zero
Technically, user privilege is anything less than kernel privilege. We modify the existing user_mode() macro to have this semantic (and use it in a couple of places it wasn't being used before), and add an IS_KERNEL_EX1() macro to the assembly code as well. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/kernel/stack.c')
-rw-r--r--arch/tile/kernel/stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/tile/kernel/stack.c b/arch/tile/kernel/stack.c
index 24fd223df65d..362284af3afd 100644
--- a/arch/tile/kernel/stack.c
+++ b/arch/tile/kernel/stack.c
@@ -103,7 +103,7 @@ static struct pt_regs *valid_fault_handler(struct KBacktraceIterator* kbt)
p->sp >= sp) {
if (kbt->verbose)
pr_err(" <%s while in kernel mode>\n", fault);
- } else if (EX1_PL(p->ex1) == USER_PL &&
+ } else if (user_mode(p) &&
p->sp < PAGE_OFFSET && p->sp != 0) {
if (kbt->verbose)
pr_err(" <%s while in user mode>\n", fault);