| /optee_os/core/kernel/ |
| H A D | mutex_lockdep.c | 40 uint32_t exceptions = 0; in mutex_lock_check() local 42 exceptions = cpu_spin_lock_xsave(&graph_lock); in mutex_lock_check() 44 cpu_spin_unlock_xrestore(&graph_lock, exceptions); in mutex_lock_check() 50 uint32_t exceptions = 0; in mutex_trylock_check() local 52 exceptions = cpu_spin_lock_xsave(&graph_lock); in mutex_trylock_check() 54 cpu_spin_unlock_xrestore(&graph_lock, exceptions); in mutex_trylock_check() 60 uint32_t exceptions = 0; in mutex_unlock_check() local 62 exceptions = cpu_spin_lock_xsave(&graph_lock); in mutex_unlock_check() 64 cpu_spin_unlock_xrestore(&graph_lock, exceptions); in mutex_unlock_check() 69 uint32_t exceptions = cpu_spin_lock_xsave(&graph_lock); in mutex_destroy_check() local [all …]
|
| H A D | pm.c | 40 uint32_t exceptions = 0; in register_pm_cb() local 53 exceptions = cpu_spin_lock_xsave(&pm_list_lock); in register_pm_cb() 66 cpu_spin_unlock_xrestore(&pm_list_lock, exceptions); in register_pm_cb() 71 uint32_t exceptions = 0; in unregister_pm_cb() local 74 exceptions = cpu_spin_lock_xsave(&pm_list_lock); in unregister_pm_cb() 88 cpu_spin_unlock_xrestore(&pm_list_lock, exceptions); in unregister_pm_cb()
|
| /optee_os/core/arch/riscv/kernel/ |
| H A D | sbi_mpxy.c | 86 uint32_t exceptions = 0; in sbi_mpxy_set_shmem() local 89 exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); in sbi_mpxy_set_shmem() 116 thread_unmask_exceptions(exceptions); in sbi_mpxy_set_shmem() 139 uint32_t exceptions = 0; in sbi_mpxy_get_channel_ids() local 144 exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); in sbi_mpxy_get_channel_ids() 175 thread_unmask_exceptions(exceptions); in sbi_mpxy_get_channel_ids() 196 uint32_t exceptions = 0; in sbi_mpxy_read_attributes() local 202 exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); in sbi_mpxy_read_attributes() 221 thread_unmask_exceptions(exceptions); in sbi_mpxy_read_attributes() 243 uint32_t exceptions = 0; in sbi_mpxy_write_attributes() local [all …]
|
| H A D | thread_arch.c | 53 void __nostackcheck thread_set_exceptions(uint32_t exceptions) in thread_set_exceptions() argument 56 if (!(exceptions & THREAD_EXCP_FOREIGN_INTR)) in thread_set_exceptions() 68 exceptions &= THREAD_EXCP_ALL; in thread_set_exceptions() 69 exceptions ^= THREAD_EXCP_ALL; in thread_set_exceptions() 72 write_csr(CSR_XIE, exceptions); in thread_set_exceptions() 76 uint32_t __nostackcheck thread_mask_exceptions(uint32_t exceptions) in thread_mask_exceptions() argument 80 thread_set_exceptions(state | (exceptions & THREAD_EXCP_ALL)); in thread_mask_exceptions() 530 uint32_t exceptions = 0; in thread_enter_user_mode() local 543 exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); in thread_enter_user_mode() 549 thread_unmask_exceptions(exceptions); in thread_enter_user_mode()
|
| /optee_os/core/mm/ |
| H A D | mobj_dyn_shm.c | 141 uint32_t exceptions = cpu_spin_lock_xsave(®_shm_map_lock); in reg_shm_free_helper() local 146 cpu_spin_unlock_xrestore(®_shm_map_lock, exceptions); in reg_shm_free_helper() 155 uint32_t exceptions = 0; in mobj_reg_shm_free() local 165 exceptions = cpu_spin_lock_xsave(®_shm_slist_lock); in mobj_reg_shm_free() 167 cpu_spin_unlock_xrestore(®_shm_slist_lock, exceptions); in mobj_reg_shm_free() 173 exceptions = cpu_spin_lock_xsave(®_shm_slist_lock); in mobj_reg_shm_free() 175 cpu_spin_unlock_xrestore(®_shm_slist_lock, exceptions); in mobj_reg_shm_free() 199 uint32_t exceptions = 0; in mobj_reg_shm_inc_map() local 206 exceptions = cpu_spin_lock_xsave(®_shm_map_lock); in mobj_reg_shm_inc_map() 214 cpu_spin_unlock_xrestore(®_shm_map_lock, exceptions); in mobj_reg_shm_inc_map() [all …]
|
| H A D | tee_mm.c | 91 uint32_t exceptions; in tee_mm_get_pool_stats() local 98 exceptions = cpu_spin_lock_xsave(&pool->lock); in tee_mm_get_pool_stats() 106 cpu_spin_unlock_xrestore(&pool->lock, exceptions); in tee_mm_get_pool_stats() 129 uint32_t exceptions = 0; in tee_mm_alloc_flags() local 142 exceptions = cpu_spin_lock_xsave(&pool->lock); in tee_mm_alloc_flags() 204 cpu_spin_unlock_xrestore(&pool->lock, exceptions); in tee_mm_alloc_flags() 207 cpu_spin_unlock_xrestore(&pool->lock, exceptions); in tee_mm_alloc_flags() 239 uint32_t exceptions; in tee_mm_alloc2() local 254 exceptions = cpu_spin_lock_xsave(&pool->lock); in tee_mm_alloc2() 281 cpu_spin_unlock_xrestore(&pool->lock, exceptions); in tee_mm_alloc2() [all …]
|
| /optee_os/core/drivers/ |
| H A D | stm32_shared_io.c | 18 static void unlock_stm32shregs(uint32_t exceptions) in unlock_stm32shregs() argument 20 may_spin_unlock(&shregs_lock, exceptions); in unlock_stm32shregs() 25 uint32_t exceptions = lock_stm32shregs(); in io_mask32_stm32shregs() local 29 unlock_stm32shregs(exceptions); in io_mask32_stm32shregs() 34 uint32_t exceptions = lock_stm32shregs(); in io_clrsetbits32_stm32shregs() local 38 unlock_stm32shregs(exceptions); in io_clrsetbits32_stm32shregs()
|
| H A D | hi16xx_rng.c | 75 uint32_t exceptions; in hw_get_random_bytes() local 77 exceptions = cpu_spin_lock_xsave(&rng_lock); in hw_get_random_bytes() 81 cpu_spin_unlock_xrestore(&rng_lock, exceptions); in hw_get_random_bytes() 84 exceptions = cpu_spin_lock_xsave(&rng_lock); in hw_get_random_bytes() 94 cpu_spin_unlock_xrestore(&rng_lock, exceptions); in hw_get_random_bytes()
|
| H A D | stm32_bsec.c | 134 static void bsec_unlock(uint32_t exceptions) in bsec_unlock() argument 136 may_spin_unlock(&lock, exceptions); in bsec_unlock() 258 uint32_t exceptions = 0; in stm32_bsec_shadow_register() local 273 exceptions = bsec_lock(); in stm32_bsec_shadow_register() 294 bsec_unlock(exceptions); in stm32_bsec_shadow_register() 333 uint32_t exceptions = 0; in stm32_bsec_write_otp() local 348 exceptions = bsec_lock(); in stm32_bsec_write_otp() 352 bsec_unlock(exceptions); in stm32_bsec_write_otp() 361 uint32_t exceptions = 0; in stm32_bsec_program_otp() local 379 exceptions = bsec_lock(); in stm32_bsec_program_otp() [all …]
|
| H A D | stm32_exti.c | 158 uint32_t exceptions = 0; in stm32_exti_set_type() local 178 exceptions = cpu_spin_lock_xsave(&exti->lock); in stm32_exti_set_type() 183 cpu_spin_unlock_xrestore(&exti->lock, exceptions); in stm32_exti_set_type() 190 uint32_t exceptions = 0; in stm32_exti_mask() local 192 exceptions = cpu_spin_lock_xsave(&exti->lock); in stm32_exti_mask() 197 cpu_spin_unlock_xrestore(&exti->lock, exceptions); in stm32_exti_mask() 205 uint32_t exceptions = 0; in stm32_exti_unmask() local 207 exceptions = cpu_spin_lock_xsave(&exti->lock); in stm32_exti_unmask() 212 cpu_spin_unlock_xrestore(&exti->lock, exceptions); in stm32_exti_unmask() 220 uint32_t exceptions = 0; in stm32_exti_enable_wake() local [all …]
|
| H A D | hisi_trng.c | 29 uint32_t exceptions = 0; in trng_read() local 31 exceptions = cpu_spin_lock_xsave(&trng_lock); in trng_read() 37 cpu_spin_unlock_xrestore(&trng_lock, exceptions); in trng_read()
|
| /optee_os/core/arch/arm/plat-stm32mp1/pm/ |
| H A D | psci.c | 51 static void __maybe_unused unlock_state_access(uint32_t exceptions) in unlock_state_access() argument 53 may_spin_unlock(&state_lock, exceptions); in unlock_state_access() 107 uint32_t exceptions = lock_state_access(); in stm32mp_register_online_cpu() local 114 unlock_state_access(exceptions); in stm32mp_register_online_cpu() 122 unlock_state_access(exceptions); in stm32mp_register_online_cpu() 154 uint32_t exceptions = 0; in psci_cpu_on() local 163 exceptions = lock_state_access(); in psci_cpu_on() 183 unlock_state_access(exceptions); in psci_cpu_on() 197 uint32_t exceptions = 0; in psci_cpu_off() local 206 exceptions = lock_state_access(); in psci_cpu_off() [all …]
|
| /optee_os/core/arch/arm/kernel/ |
| H A D | virtualization.c | 78 uint32_t exceptions = thread_mask_exceptions(THREAD_EXCP_FOREIGN_INTR); in get_current_prtn() local 82 thread_unmask_exceptions(exceptions); in get_current_prtn() 98 uint32_t exceptions = thread_mask_exceptions(THREAD_EXCP_FOREIGN_INTR); in set_current_prtn() local 102 thread_unmask_exceptions(exceptions); in set_current_prtn() 306 uint32_t exceptions = 0; in virt_guest_created() local 341 exceptions = cpu_spin_lock_xsave(&prtn_list_lock); in virt_guest_created() 343 cpu_spin_unlock_xrestore(&prtn_list_lock, exceptions); in virt_guest_created() 401 uint32_t exceptions = 0; in virt_next_guest() local 403 exceptions = cpu_spin_lock_xsave(&prtn_list_lock); in virt_next_guest() 413 cpu_spin_unlock_xrestore(&prtn_list_lock, exceptions); in virt_next_guest() [all …]
|
| H A D | timer_a64.c | 15 uint32_t exceptions = cpu_spin_lock_xsave(&timer_lock); in generic_timer_start() local 31 cpu_spin_unlock_xrestore(&timer_lock, exceptions); in generic_timer_start() 36 uint32_t exceptions = cpu_spin_lock_xsave(&timer_lock); in generic_timer_stop() local 43 cpu_spin_unlock_xrestore(&timer_lock, exceptions); in generic_timer_stop()
|
| /optee_os/core/arch/arm/mm/ |
| H A D | sp_mem.c | 162 uint32_t exceptions = 0; in inactivate() local 164 exceptions = cpu_spin_lock_xsave(&sp_mem_lock); in inactivate() 173 cpu_spin_unlock_xrestore(&sp_mem_lock, exceptions); in inactivate() 198 uint32_t exceptions = cpu_spin_lock_xsave(&sp_mem_lock); in sp_mem_get() local 205 cpu_spin_unlock_xrestore(&sp_mem_lock, exceptions); in sp_mem_get() 224 uint32_t exceptions = 0; in sp_mem_new() local 231 exceptions = cpu_spin_lock_xsave(&sp_mem_lock); in sp_mem_new() 235 cpu_spin_unlock_xrestore(&sp_mem_lock, exceptions); in sp_mem_new() 248 cpu_spin_unlock_xrestore(&sp_mem_lock, exceptions); in sp_mem_new() 255 uint32_t exceptions = cpu_spin_lock_xsave(&sp_mem_lock); in sp_mem_add() local [all …]
|
| H A D | mobj_ffa.c | 218 uint32_t exceptions = 0; in mobj_ffa_sel1_spmc_new() local 251 exceptions = cpu_spin_lock_xsave(&shm_lock); in mobj_ffa_sel1_spmc_new() 264 cpu_spin_unlock_xrestore(&shm_lock, exceptions); in mobj_ffa_sel1_spmc_new() 380 uint32_t exceptions = 0; in mobj_ffa_sel1_spmc_delete() local 389 exceptions = cpu_spin_lock_xsave(&shm_lock); in mobj_ffa_sel1_spmc_delete() 392 cpu_spin_unlock_xrestore(&shm_lock, exceptions); in mobj_ffa_sel1_spmc_delete() 486 uint32_t exceptions = 0; in mobj_ffa_push_to_inactive() local 488 exceptions = cpu_spin_lock_xsave(&shm_lock); in mobj_ffa_push_to_inactive() 507 cpu_spin_unlock_xrestore(&shm_lock, exceptions); in mobj_ffa_push_to_inactive() 527 uint32_t exceptions = 0; in mobj_ffa_sel1_spmc_reclaim() local [all …]
|
| H A D | core_mmu.c | 101 uint32_t exceptions = thread_mask_exceptions(THREAD_EXCP_FOREIGN_INTR); in cache_op_outer() local 152 thread_unmask_exceptions(exceptions); in cache_op_outer() 159 uint32_t exceptions = cpu_spin_lock_xsave(&g_asid_spinlock); in asid_alloc() local 171 cpu_spin_unlock_xrestore(&g_asid_spinlock, exceptions); in asid_alloc() 177 uint32_t exceptions = cpu_spin_lock_xsave(&g_asid_spinlock); in asid_free() local 189 cpu_spin_unlock_xrestore(&g_asid_spinlock, exceptions); in asid_free() 194 uint32_t exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); in arch_va2pa_helper() local 224 thread_unmask_exceptions(exceptions); in arch_va2pa_helper()
|
| /optee_os/core/include/kernel/ |
| H A D | spinlock.h | 121 uint32_t exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); in cpu_spin_lock_xsave_no_dldetect() local 124 return exceptions; in cpu_spin_lock_xsave_no_dldetect() 135 uint32_t exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); in cpu_spin_lock_xsave_dldetect() local 138 return exceptions; in cpu_spin_lock_xsave_dldetect() 148 uint32_t exceptions) in cpu_spin_unlock_xrestore() argument 151 thread_unmask_exceptions(exceptions); in cpu_spin_unlock_xrestore()
|
| /optee_os/core/drivers/wdt/ |
| H A D | watchdog_sm.c | 20 uint32_t exceptions = 0; in __wdt_sm_handler() local 28 exceptions = cpu_spin_lock_xsave(&wdt_lock); in __wdt_sm_handler() 30 cpu_spin_unlock_xrestore(&wdt_lock, exceptions); in __wdt_sm_handler() 41 exceptions = cpu_spin_lock_xsave(&wdt_lock); in __wdt_sm_handler() 44 cpu_spin_unlock_xrestore(&wdt_lock, exceptions); in __wdt_sm_handler()
|
| /optee_os/core/drivers/rstctrl/ |
| H A D | rstctrl.c | 17 uint32_t exceptions = 0; in rstctrl_get_exclusive() local 21 exceptions = cpu_spin_lock_xsave(&rstctrl_lock); in rstctrl_get_exclusive() 28 cpu_spin_unlock_xrestore(&rstctrl_lock, exceptions); in rstctrl_get_exclusive()
|
| /optee_os/core/drivers/imx/mu/ |
| H A D | imx_mu.c | 162 uint32_t exceptions = 0; in imx_mu_init() local 169 exceptions = cpu_spin_lock_xsave(&mu_spinlock); in imx_mu_init() 173 cpu_spin_unlock_xrestore(&mu_spinlock, exceptions); in imx_mu_init() 180 uint32_t exceptions = 0; in imx_mu_call() local 185 exceptions = cpu_spin_lock_xsave(&mu_spinlock); in imx_mu_call() 191 cpu_spin_unlock_xrestore(&mu_spinlock, exceptions); in imx_mu_call()
|
| /optee_os/core/arch/arm/plat-rcar/ |
| H A D | hw_rng.c | 29 uint32_t exceptions; in hw_get_random_bytes() local 37 exceptions = cpu_spin_lock_xsave(&spin_lock); in hw_get_random_bytes() 51 cpu_spin_unlock_xrestore(&spin_lock, exceptions); in hw_get_random_bytes()
|
| /optee_os/core/arch/arm/plat-stm32mp2/ |
| H A D | stm32_util.h | 15 #define may_spin_unlock(lock, exceptions) cpu_spin_unlock_xrestore(lock, \ argument 16 exceptions)
|
| /optee_os/lib/libutils/isoc/ |
| H A D | bget_malloc.c | 153 static void malloc_unlock(struct malloc_ctx *ctx, uint32_t exceptions) in malloc_unlock() argument 155 cpu_spin_unlock_xrestore(&ctx->spinlock, exceptions); in malloc_unlock() 166 uint32_t exceptions __unused) in malloc_unlock() 305 uint32_t exceptions = malloc_lock(ctx); in gen_malloc_reset_stats() local 311 malloc_unlock(ctx, exceptions); in gen_malloc_reset_stats() 322 uint32_t exceptions = malloc_lock(ctx); in gen_malloc_get_stats() local 325 malloc_unlock(ctx, exceptions); in gen_malloc_get_stats() 612 uint32_t exceptions = 0; in mem_alloc() local 615 exceptions = malloc_lock(ctx); in mem_alloc() 618 malloc_unlock(ctx, exceptions); in mem_alloc() [all …]
|
| /optee_os/core/arch/arm/plat-synquacer/ |
| H A D | rng_pta.c | 230 uint32_t exceptions = 0; in rng_collect_entropy() local 232 exceptions = cpu_spin_lock_xsave(&entropy_lock); in rng_collect_entropy() 253 cpu_spin_unlock_xrestore(&entropy_lock, exceptions); in rng_collect_entropy() 262 uint32_t exceptions = 0; in rng_get_entropy() local 282 exceptions = cpu_spin_lock_xsave(&entropy_lock); in rng_get_entropy() 310 cpu_spin_unlock_xrestore(&entropy_lock, exceptions); in rng_get_entropy()
|