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()
207 old_mask = plat_ic_set_priority_mask(pe_data->init_pri_mask); in ehf_deactivate_priority()
217 EHF_LOG("deactivate prio=%d\n", get_pe_highest_active_idx(pe_data)); in ehf_deactivate_priority()
234 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_exited_normal_world() local
242 if (has_valid_pri_activations(pe_data)) in ehf_exited_normal_world()
245 assert(pe_data->ns_pri_mask == 0u); in ehf_exited_normal_world()
247 pe_data->ns_pri_mask = in ehf_exited_normal_world()
251 if (IS_PRI_SECURE(pe_data->ns_pri_mask)) { in ehf_exited_normal_world()
253 pe_data->ns_pri_mask); in ehf_exited_normal_world()
257 EHF_LOG("Priority Mask: 0x%x => 0x%x\n", pe_data->ns_pri_mask, in ehf_exited_normal_world()
277 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_entering_normal_world() local
288 if (has_valid_pri_activations(pe_data)) in ehf_entering_normal_world()
292 if (pe_data->ns_pri_mask == 0U) in ehf_entering_normal_world()
295 old_pmr = plat_ic_set_priority_mask(pe_data->ns_pri_mask); in ehf_entering_normal_world()
303 (old_pmr != pe_data->ns_pri_mask)) { in ehf_entering_normal_world()
308 EHF_LOG("Priority Mask: 0x%x => 0x%x\n", old_pmr, pe_data->ns_pri_mask); in ehf_entering_normal_world()
310 pe_data->ns_pri_mask = 0; in ehf_entering_normal_world()
330 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_allow_ns_preemption() local
336 assert(pe_data->ns_pri_mask != 0U); in ehf_allow_ns_preemption()
339 if (has_valid_pri_activations(pe_data)) { in ehf_allow_ns_preemption()
341 read_mpidr_el1(), pe_data->active_pri_bits); in ehf_allow_ns_preemption()
354 old_pmr = plat_ic_set_priority_mask(pe_data->ns_pri_mask); in ehf_allow_ns_preemption()
356 EHF_LOG("Priority Mask: 0x%x => 0x%x\n", old_pmr, pe_data->ns_pri_mask); in ehf_allow_ns_preemption()
358 pe_data->ns_pri_mask = 0; in ehf_allow_ns_preemption()
368 pe_exc_data_t *pe_data = this_cpu_data(); in ehf_is_ns_preemption_allowed() local
382 if (has_valid_pri_activations(pe_data)) in ehf_is_ns_preemption_allowed()
384 if (pe_data->ns_pri_mask != 0U) in ehf_is_ns_preemption_allowed()