diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-09-03 14:45:52 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-09-03 14:45:52 -0400 |
commit | 051168df528fe4456d63f5f65b041c147c26fe97 (patch) | |
tree | 789109ca42db49bf4d8c0c2794cf55659a171a39 /arch/tile/mm | |
parent | 309272f99f3e65b9bb5c49a2901c63a1859172f3 (diff) |
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/mm')
-rw-r--r-- | arch/tile/mm/fault.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 64eec3f9584f..39c48cbe0a96 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -283,7 +283,7 @@ static int handle_page_fault(struct pt_regs *regs, | |||
283 | flags = (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | | 283 | flags = (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | |
284 | (write ? FAULT_FLAG_WRITE : 0)); | 284 | (write ? FAULT_FLAG_WRITE : 0)); |
285 | 285 | ||
286 | is_kernel_mode = (EX1_PL(regs->ex1) != USER_PL); | 286 | is_kernel_mode = !user_mode(regs); |
287 | 287 | ||
288 | tsk = validate_current(); | 288 | tsk = validate_current(); |
289 | 289 | ||
@@ -824,7 +824,7 @@ void do_page_fault(struct pt_regs *regs, int fault_num, | |||
824 | } | 824 | } |
825 | 825 | ||
826 | #if CHIP_HAS_TILE_DMA() || CHIP_HAS_SN_PROC() | 826 | #if CHIP_HAS_TILE_DMA() || CHIP_HAS_SN_PROC() |
827 | if (EX1_PL(regs->ex1) != USER_PL) { | 827 | if (!user_mode(regs)) { |
828 | struct async_tlb *async; | 828 | struct async_tlb *async; |
829 | switch (fault_num) { | 829 | switch (fault_num) { |
830 | #if CHIP_HAS_TILE_DMA() | 830 | #if CHIP_HAS_TILE_DMA() |