sdk/linux_kernel_drivers/xocl/xocl_exec.c
/**
 * penguin_submit() - penguin submit of a command
 *
 * @xcmd: command to submit
 *
 * Special processing for configure command.  Configuration itself is
 * done/called by queued_to_running before calling penguin_submit.  In penguin
 * mode configuration need to ensure that the command is retired properly by
 * scheduler, so assign it a slot index and let normal flow continue.
 *
 * Return: %true on successful submit, %false otherwise
 */
penguin submit of a command
@xcmd: command to submit

Special processing for configure command.  Configuration itself is
done/called by queued_to_running before calling penguin_submit.  In penguin
mode configuration need to ensure that the command is retired properly by
scheduler, so assign it a slot index and let normal flow continue.

%true on successful submit, %false otherwise
penguin submit of a command @xcmd : command to submit Special processing for configure command . Configuration itself is done / called by queued_to_running before calling penguin_submit . In penguin mode configuration need to ensure that the command is retired properly by scheduler so assign it a slot index and let normal flow continue . %true on successful submit %false otherwise
static int
penguin_submit(struct xocl_cmd *xcmd)
{
	SCHED_DEBUG("-> penguin_submit\n");
	if (opcode(xcmd)==ERT_CONFIGURE) {
		xcmd->slot_idx = acquire_slot_idx(xcmd->xdev);
		SCHED_DEBUG("<- penguin_submit (configure)\n");
		return 1;
	}
	if (opcode(xcmd)!=ERT_START_CU)
		return 0;
	xcmd->cu_idx = get_free_cu(xcmd);
	if (xcmd->cu_idx<0)
		return 0;
	xcmd->slot_idx = acquire_slot_idx(xcmd->xdev);
	if (xcmd->slot_idx<0)
		return 0;
	configure_cu(xcmd,xcmd->cu_idx);
	SCHED_DEBUGF("<- penguin_submit cu_idx=%d slot=%d\n",xcmd->cu_idx,xcmd->slot_idx);
	return 1;
}
static int penguin_submit ( struct xocl_cmd * xcmd ) { SCHED_DEBUG ( " \n " ) ; if ( opcode ( xcmd ) == ERT_CONFIGURE ) { xcmd -> slot_idx = acquire_slot_idx ( xcmd -> xdev ) ; SCHED_DEBUG ( " \n " ) ; return 1 ; } if ( opcode ( xcmd ) != ERT_START_CU ) return 0 ; xcmd -> cu_idx = get_free_cu ( xcmd ) ; if ( xcmd -> cu_idx < 0 ) return 0 ; xcmd -> slot_idx = acquire_slot_idx ( xcmd -> xdev ) ; if ( xcmd -> slot_idx < 0 ) return 0 ; configure_cu ( xcmd , xcmd -> cu_idx ) ; SCHED_DEBUGF ( " \n " , xcmd -> cu_idx , xcmd -> slot_idx ) ; return 1 ; }
penguin_submit() - penguin submit of a command
 @xcmd: command to submit
penguin_submit () - penguin submit of a command @xcmd : command to submit
/* configuration was done by submit_cmds, ensure the cmd retired properly */ /* extract cu list */ /* found free cu, transfer regmap and start it */