Lines Matching refs:num
34 static void set_raw_exception_handler_and_restore_interrupts(enum exception_number num, exception_h… in set_raw_exception_handler_and_restore_interrupts() argument
36 get_exception_table()[num] = handler; in set_raw_exception_handler_and_restore_interrupts()
41 static inline void check_exception_param(__unused enum exception_number num) { in check_exception_param() argument
42 invalid_params_if(HARDWARE_EXCEPTION, num < MIN_EXCEPTION_NUM || num > MAX_EXCEPTION_NUM); in check_exception_param()
45 exception_handler_t exception_get_vtable_handler(enum exception_number num) { in exception_get_vtable_handler() argument
46 check_exception_param(num); in exception_get_vtable_handler()
47 return get_exception_table()[num]; in exception_get_vtable_handler()
50 exception_handler_t exception_set_exclusive_handler(enum exception_number num, exception_handler_t … in exception_set_exclusive_handler() argument
51 check_exception_param(num); in exception_set_exclusive_handler()
54 exception_handler_t current = exception_get_vtable_handler(num); in exception_set_exclusive_handler()
56 set_raw_exception_handler_and_restore_interrupts(num, handler, save); in exception_set_exclusive_handler()
63 void exception_restore_handler(enum exception_number num, exception_handler_t original_handler) { in exception_restore_handler() argument
67 set_raw_exception_handler_and_restore_interrupts(num, original_handler, save); in exception_restore_handler()
75 static io_rw_32 *get_shpr0(uint num) { in get_shpr0() argument
79 if (num >= 8 && num < 16) shpr0 = (io_rw_32 *) (PPB_BASE + ARM_CPU_PREFIXED(SHPR2_OFFSET) - 8); in get_shpr0()
82 if (num >= 4 && num < 16) shpr0 = (io_rw_32 *)(PPB_BASE + ARM_CPU_PREFIXED(SHPR1_OFFSET) - 4); in get_shpr0()
87 bool exception_set_priority(uint num, uint8_t hardware_priority) { in exception_set_priority() argument
88 io_rw_32 *shpr0 = get_shpr0(num); in exception_set_priority()
91 …shpr0[num / 4] = (shpr0[num/4] & ~(0xffu << (8 * (num & 3u)))) | (((uint32_t) hardware_priority) <… in exception_set_priority()
97 uint exception_get_priority(uint num) { in exception_get_priority() argument
98 io_rw_32 *shpr0 = get_shpr0(num); in exception_get_priority()
101 return (uint8_t) (shpr0[num/4] >> (8 * (num & 3))); in exception_get_priority()