XRT
XRT copied to clipboard
Islot changes
Introduce a new data structure i.e. islot_info from icap. XCLBIN related information is separated from icap structure and added to the new islot_info data structure.
This is required for multislot support. As we need to cache multiple xclbin information. Right now there is no functionality changes. Only data structure changes.
Also make sure that changes are concentrate within icap.c file. Hence used slot-0 as default slot. All the other APIs which has a referencs of some other file remain unchanged and used slot 0 as default slot.
Basic xbutil validate is working fine with this changes
Build Failed! :(
Build Failed! :(
retest this please
The per-islot (BTW, why 'i'slot? why not just slot?) lock does not work well. There are cases where you need a lock across all slots. E.g., static void platform_reset_axi_gate(struct platform_device *pdev) { struct icap *icap = platform_get_drvdata(pdev); uint32_t slot_id = DEFAULT_SLOT_ID; // Default Slot
/* Can only be done from mgmt pf. */ if (!ICAP_PRIVILEGED(icap)) return; mutex_lock(&icap->icap_lock); if (!icap_bitstream_in_use(icap, slot_id)) { (void) icap_freeze_axi_gate(platform_get_drvdata(pdev)); (void) icap_free_axi_gate(platform_get_drvdata(pdev)); } mutex_unlock(&icap->icap_lock);
} The axi gate resetting may impact ALL slots, but you just check in-use state of one of them to determine if axi-gate can be reset or not. This does not look right. There maybe other cases...
Anyway, why do you need a per-slot lock? Can we just have one big lock for all slots so that locking schema does not need to change?
This seems to a good idea. I am agree to having a single lock. It will reduce the chance to introduce new BUG. I will make the necessary changes. Thanks.
Build Failed! :(
retest this please
Build Failed! :(
Build Failed! :(
Build Failed! :(
Build Failed! :(
Build Failed! :(
Build Failed! :(
retest this please.
Build Passed!
Build Failed! :(
retest this please.
Build Failed! :(
Build Failed! :(
retest this please
Build Passed!
Build Passed!
@saifuddin-xilinx please rebase this PR
Build Passed!