Lines Matching refs:pe_data

66 static bool has_valid_pri_activations(pe_exc_data_t *pe_data)  in has_valid_pri_activations()  argument
68 return pe_data->active_pri_bits != 0U; in has_valid_pri_activations()
80 static int get_pe_highest_active_idx(pe_exc_data_t *pe_data) in get_pe_highest_active_idx() argument
82 if (!has_valid_pri_activations(pe_data)) in get_pe_highest_active_idx()
86 return (int) __builtin_ctz(pe_data->active_pri_bits); in get_pe_highest_active_idx()
103 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_activate_priority() local
122 cur_pri_idx = get_pe_highest_active_idx(pe_data); in ehf_activate_priority()
132 pe_data->active_pri_bits |= PRI_BIT(idx); in ehf_activate_priority()
151 pe_data->init_pri_mask = (uint8_t) old_mask; in ehf_activate_priority()
153 EHF_LOG("activate prio=%d\n", get_pe_highest_active_idx(pe_data)); in ehf_activate_priority()
169 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_deactivate_priority() local
189 cur_pri_idx = get_pe_highest_active_idx(pe_data); in ehf_deactivate_priority()
199 pe_data->active_pri_bits &= (pe_data->active_pri_bits - 1u); in ehf_deactivate_priority()
205 cur_pri_idx = get_pe_highest_active_idx(pe_data); in ehf_deactivate_priority()
209 old_mask = plat_ic_deactivate_priority(pe_data->init_pri_mask); in ehf_deactivate_priority()
215 old_mask = plat_ic_set_priority_mask(pe_data->init_pri_mask); in ehf_deactivate_priority()
227 EHF_LOG("deactivate prio=%d\n", get_pe_highest_active_idx(pe_data)); in ehf_deactivate_priority()
244 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_exited_normal_world() local
252 if (has_valid_pri_activations(pe_data)) in ehf_exited_normal_world()
255 assert(pe_data->ns_pri_mask == 0u); in ehf_exited_normal_world()
257 pe_data->ns_pri_mask = in ehf_exited_normal_world()
261 if (IS_PRI_SECURE(pe_data->ns_pri_mask)) { in ehf_exited_normal_world()
263 pe_data->ns_pri_mask); in ehf_exited_normal_world()
267 EHF_LOG("Priority Mask: 0x%x => 0x%x\n", pe_data->ns_pri_mask, in ehf_exited_normal_world()
287 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_entering_normal_world() local
298 if (has_valid_pri_activations(pe_data)) in ehf_entering_normal_world()
302 if (pe_data->ns_pri_mask == 0U) in ehf_entering_normal_world()
305 old_pmr = plat_ic_set_priority_mask(pe_data->ns_pri_mask); in ehf_entering_normal_world()
313 (old_pmr != pe_data->ns_pri_mask)) { in ehf_entering_normal_world()
318 EHF_LOG("Priority Mask: 0x%x => 0x%x\n", old_pmr, pe_data->ns_pri_mask); in ehf_entering_normal_world()
320 pe_data->ns_pri_mask = 0; in ehf_entering_normal_world()
340 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_allow_ns_preemption() local
346 assert(pe_data->ns_pri_mask != 0U); in ehf_allow_ns_preemption()
349 if (has_valid_pri_activations(pe_data)) { in ehf_allow_ns_preemption()
351 read_mpidr_el1(), pe_data->active_pri_bits); in ehf_allow_ns_preemption()
364 old_pmr = plat_ic_set_priority_mask(pe_data->ns_pri_mask); in ehf_allow_ns_preemption()
366 EHF_LOG("Priority Mask: 0x%x => 0x%x\n", old_pmr, pe_data->ns_pri_mask); in ehf_allow_ns_preemption()
368 pe_data->ns_pri_mask = 0; in ehf_allow_ns_preemption()
378 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_is_ns_preemption_allowed() local
392 if (has_valid_pri_activations(pe_data)) in ehf_is_ns_preemption_allowed()
394 if (pe_data->ns_pri_mask != 0U) in ehf_is_ns_preemption_allowed()