Lines Matching refs:cpsr

62 	uint32_t cpsr = read_cpsr();  in thread_get_exceptions()  local
64 return (cpsr >> CPSR_F_SHIFT) & THREAD_EXCP_ALL; in thread_get_exceptions()
69 uint32_t cpsr = read_cpsr(); in thread_set_exceptions() local
75 cpsr &= ~(THREAD_EXCP_ALL << CPSR_F_SHIFT); in thread_set_exceptions()
76 cpsr |= ((exceptions & THREAD_EXCP_ALL) << CPSR_F_SHIFT); in thread_set_exceptions()
79 write_cpsr(cpsr); in thread_set_exceptions()
161 thread->regs.cpsr = read_cpsr() & ARM32_CPSR_E; in init_regs()
162 thread->regs.cpsr |= CPSR_MODE_SVC | CPSR_A | in init_regs()
166 thread->regs.cpsr |= CPSR_T; in init_regs()
196 thread->regs.cpsr = SPSR_64(SPSR_64_MODE_EL1, SPSR_64_MODE_SP_EL0, in init_regs()
313 static bool is_from_user(uint32_t cpsr) in is_from_user() argument
315 return (cpsr & ARM32_CPSR_MODE_MASK) == ARM32_CPSR_MODE_USR; in is_from_user()
320 static bool is_from_user(uint32_t cpsr) in is_from_user() argument
322 if (cpsr & (SPSR_MODE_RW_32 << SPSR_MODE_RW_SHIFT)) in is_from_user()
324 if (((cpsr >> SPSR_64_MODE_EL_SHIFT) & SPSR_64_MODE_EL_MASK) == in is_from_user()
359 return is_from_user((uint32_t)regs->cpsr); in is_user_mode()
474 uint32_t cpsr __maybe_unused) in release_unused_kernel_stack()
483 vaddr_t sp = is_from_user(cpsr) ? thr->kern_sp : thr->regs.sp; in release_unused_kernel_stack()
494 uint32_t cpsr __unused) in release_unused_kernel_stack()
499 int thread_state_suspend(uint32_t flags, uint32_t cpsr, vaddr_t pc) in thread_state_suspend() argument
511 release_unused_kernel_stack(threads + ct, cpsr); in thread_state_suspend()
513 if (is_from_user(cpsr)) { in thread_state_suspend()
524 threads[ct].regs.cpsr = cpsr; in thread_state_suspend()
961 regs->cpsr = spsr; in set_ctx_regs()
969 regs->cpsr = spsr; in set_ctx_regs()