diff options
author | Peter Colberg <peter.colberg@intel.com> | 2024-11-19 20:10:30 -0500 |
---|---|---|
committer | Xu Yilun <yilun.xu@linux.intel.com> | 2024-12-18 22:28:48 +0800 |
commit | 59c265babab697aaa80814fe808cbb8942a14b9d (patch) | |
tree | 1a11cb56fd4013b3dfcfbda9559ac138f5ef3222 /tools/perf/scripts/python | |
parent | 3ddcf99119603b102e19e5f44338c1524cc549b7 (diff) |
fpga: dfl: store platform device id in feature device data
Delay the feature device id allocation from build_info_create_dev() to
binfo_create_feature_dev_data() and store the id in the feature device
data before copying it to the device. This will allow reusing the same
id in a subsequent commit which completely destroys and recreates the
feature device when releasing and reassigning the corresponding port.
Instead of manually freeing the id when no longer needed, use a
device-managed resource with a custom action to automatically free
the id right before the feature device data is freed. The id registry
is guaranteed to be allocated when dfl_id_free_action() is invoked,
since the DFL PCIe device and its device-managed resources will be
destroyed before dfl_ids_destroy() is called in dfl_fpga_exit().
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20241120011035.230574-15-peter.colberg@intel.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions