Lines Matching refs:cpsr

61 	uint32_t cpsr = read_cpsr();  in thread_get_exceptions()  local
63 return (cpsr >> CPSR_F_SHIFT) & THREAD_EXCP_ALL; in thread_get_exceptions()
68 uint32_t cpsr = read_cpsr(); in thread_set_exceptions() local
74 cpsr &= ~(THREAD_EXCP_ALL << CPSR_F_SHIFT); in thread_set_exceptions()
75 cpsr |= ((exceptions & THREAD_EXCP_ALL) << CPSR_F_SHIFT); in thread_set_exceptions()
78 write_cpsr(cpsr); in thread_set_exceptions()
160 thread->regs.cpsr = read_cpsr() & ARM32_CPSR_E; in init_regs()
161 thread->regs.cpsr |= CPSR_MODE_SVC | CPSR_A | in init_regs()
165 thread->regs.cpsr |= CPSR_T; in init_regs()
195 thread->regs.cpsr = SPSR_64(SPSR_64_MODE_EL1, SPSR_64_MODE_SP_EL0, in init_regs()
312 static bool is_from_user(uint32_t cpsr) in is_from_user() argument
314 return (cpsr & ARM32_CPSR_MODE_MASK) == ARM32_CPSR_MODE_USR; in is_from_user()
319 static bool is_from_user(uint32_t cpsr) in is_from_user() argument
321 if (cpsr & (SPSR_MODE_RW_32 << SPSR_MODE_RW_SHIFT)) in is_from_user()
323 if (((cpsr >> SPSR_64_MODE_EL_SHIFT) & SPSR_64_MODE_EL_MASK) == in is_from_user()
358 return is_from_user((uint32_t)regs->cpsr); in is_user_mode()
457 uint32_t cpsr __maybe_unused) in release_unused_kernel_stack()
466 vaddr_t sp = is_from_user(cpsr) ? thr->kern_sp : thr->regs.sp; in release_unused_kernel_stack()
477 uint32_t cpsr __unused) in release_unused_kernel_stack()
482 int thread_state_suspend(uint32_t flags, uint32_t cpsr, vaddr_t pc) in thread_state_suspend() argument
494 release_unused_kernel_stack(threads + ct, cpsr); in thread_state_suspend()
496 if (is_from_user(cpsr)) { in thread_state_suspend()
507 threads[ct].regs.cpsr = cpsr; in thread_state_suspend()
961 regs->cpsr = spsr; in set_ctx_regs()
970 regs->cpsr = spsr; in set_ctx_regs()