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>
This commit is contained in:
@@ -39,7 +39,7 @@ typedef unsigned long pt_reg_t;
|
||||
#define user_stack_pointer(regs) ((regs)->sp)
|
||||
|
||||
/* Does the process account for user or for system time? */
|
||||
#define user_mode(regs) (EX1_PL((regs)->ex1) == USER_PL)
|
||||
#define user_mode(regs) (EX1_PL((regs)->ex1) < KERNEL_PL)
|
||||
|
||||
/* Fill in a struct pt_regs with the current kernel registers. */
|
||||
struct pt_regs *get_pt_regs(struct pt_regs *);
|
||||
|
Reference in New Issue
Block a user