XRT icon indicating copy to clipboard operation
XRT copied to clipboard

Islot changes

Open saifuddin-xilinx opened this issue 2 years ago • 2 comments

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

saifuddin-xilinx avatar Aug 14 '22 20:08 saifuddin-xilinx

Build Failed! :(

gbuildx avatar Aug 15 '22 01:08 gbuildx

Build Failed! :(

gbuildx avatar Aug 15 '22 18:08 gbuildx

retest this please

saifuddin-xilinx avatar Aug 17 '22 02:08 saifuddin-xilinx

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.

saifuddin-xilinx avatar Aug 17 '22 04:08 saifuddin-xilinx

Build Failed! :(

gbuildx avatar Aug 17 '22 05:08 gbuildx

retest this please

salindac avatar Aug 17 '22 18:08 salindac

Build Failed! :(

gbuildx avatar Aug 17 '22 21:08 gbuildx

Build Failed! :(

gbuildx avatar Aug 18 '22 07:08 gbuildx

Build Failed! :(

gbuildx avatar Aug 20 '22 10:08 gbuildx

Build Failed! :(

gbuildx avatar Aug 22 '22 05:08 gbuildx

Build Failed! :(

gbuildx avatar Aug 24 '22 12:08 gbuildx

Build Failed! :(

gbuildx avatar Aug 24 '22 13:08 gbuildx

retest this please.

dayeh-xilinx avatar Aug 24 '22 21:08 dayeh-xilinx

Build Passed!

gbuildx avatar Aug 24 '22 23:08 gbuildx

Build Failed! :(

gbuildx avatar Sep 02 '22 02:09 gbuildx

retest this please.

dayeh-xilinx avatar Sep 02 '22 04:09 dayeh-xilinx

Build Failed! :(

gbuildx avatar Sep 02 '22 07:09 gbuildx

Build Failed! :(

gbuildx avatar Sep 02 '22 10:09 gbuildx

retest this please

saifuddin-xilinx avatar Sep 02 '22 18:09 saifuddin-xilinx

Build Passed!

gbuildx avatar Sep 02 '22 22:09 gbuildx

Build Passed!

gbuildx avatar Sep 07 '22 09:09 gbuildx

@saifuddin-xilinx please rebase this PR

chvamshi-xilinx avatar Oct 11 '22 09:10 chvamshi-xilinx

Build Passed!

gbuildx avatar Oct 11 '22 22:10 gbuildx