MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / its_cmd_submit_nomap

Function its_cmd_submit_nomap

components/drivers/pic/pic-gicv3-its.c:316–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316static rt_err_t its_cmd_submit_nomap(struct gicv3_its *its, struct its_command *cmd,
317 int cpu_id, rt_bool_t sync)
318{
319 rt_err_t err;
320 struct its_command *hw_cmd;
321
322 rt_hw_spin_lock(&its->cmd_lock.lock);
323
324 if (!(hw_cmd = its_cmd_alloc(its)))
325 {
326 err = -RT_EBUSY;
327 goto _out_lock;
328 }
329
330 rt_memcpy(hw_cmd, cmd, sizeof(*hw_cmd));
331
332 if ((err = its_cmd_submit_raw(its, hw_cmd)))
333 {
334 goto _out_lock;
335 }
336
337 if (sync)
338 {
339 if (!(hw_cmd = its_cmd_alloc(its)))
340 {
341 err = -RT_EBUSY;
342 goto _out_lock;
343 }
344
345 its_encode_cmd(hw_cmd, GITS_CMD_SYNC);
346 its_encode_target(hw_cmd, its->collections[cpu_id].target_address);
347
348 err = its_cmd_submit_raw(its, hw_cmd);
349 }
350
351_out_lock:
352 rt_hw_spin_unlock(&its->cmd_lock.lock);
353
354 return err;
355}
356
357static rt_err_t its_cmd_submit(struct gicv3_its *its, struct its_command *cmd,
358 struct its_map *map, rt_bool_t sync)

Callers 2

its_cmd_submitFunction · 0.85

Calls 7

its_cmd_allocFunction · 0.85
rt_memcpyFunction · 0.85
its_cmd_submit_rawFunction · 0.85
its_encode_cmdFunction · 0.85
its_encode_targetFunction · 0.85
rt_hw_spin_lockFunction · 0.50
rt_hw_spin_unlockFunction · 0.50

Tested by

no test coverage detected