History

habanalabs: add kernel-doc style comments

Modify some comments in the uapi file to be in kernel-doc style.

Oded Gabbay committed 5 years ago

Commit 511c1951 parent 22d4f9b1 file · +25 −18Browse files

Showing the changes to include/uapi/misc (1 of 1 file). Show all

Unified · Split

include/uapi/misc/habanalabs.h+25−18
@@ -272,6 +272,16 @@ enum hl_gaudi_pll_index { · 271 unmodified lines
272272 HL_GAUDI_PLL_MAX
273273 };
274274
275+/**
276+ * enum hl_device_status - Device status information.
277+ * @HL_DEVICE_STATUS_OPERATIONAL: Device is operational.
278+ * @HL_DEVICE_STATUS_IN_RESET: Device is currently during reset.
279+ * @HL_DEVICE_STATUS_MALFUNCTION: Device is unusable.
280+ * @HL_DEVICE_STATUS_NEEDS_RESET: Device needs reset because auto reset was disabled.
281+ * @HL_DEVICE_STATUS_IN_DEVICE_CREATION: Device is operational but its creation is still in
282+ * progress.
283+ * @HL_DEVICE_STATUS_LAST: Last status.
284+ */
275285 enum hl_device_status {
276286 HL_DEVICE_STATUS_OPERATIONAL,
277287 HL_DEVICE_STATUS_IN_RESET,
@@ -556,33 +566,30 @@ enum gaudi_dcores { · 278 unmodified lines
556566 HL_GAUDI_ES_DCORE
557567 };
558568
569+/**
570+ * struct hl_info_args - Main structure to retrieve device related information.
571+ * @return_pointer: User space address of the relevant structure related to HL_INFO_* operation
572+ * mentioned in @op.
573+ * @return_size: Size of the structure used in @return_pointer, just like "size" in "snprintf", it
574+ * limits how many bytes the kernel can write. For hw_events array, the size should be
575+ * hl_info_hw_ip_info.num_of_events * sizeof(__u32).
576+ * @op: Defines which type of information to be retrieved. Refer HL_INFO_* for details.
577+ * @dcore_id: DCORE id for which the information is relevant (for Gaudi refer to enum gaudi_dcores).
578+ * @ctx_id: Context ID of the user. Currently not in use.
579+ * @period_ms: Period value, in milliseconds, for utilization rate in range 100ms - 1000ms in 100 ms
580+ * resolution. Currently not in use.
581+ * @pll_index: Index as defined in hl_<asic type>_pll_index enumeration.
582+ * @pad: Padding to 64 bit.
583+ */
559584 struct hl_info_args {
560− /* Location of relevant struct in userspace */
561585 __u64 return_pointer;
562− /*
563− * The size of the return value. Just like "size" in "snprintf",
564− * it limits how many bytes the kernel can write
565− *
566− * For hw_events array, the size should be
567− * hl_info_hw_ip_info.num_of_events * sizeof(__u32)
568− */
569586 __u32 return_size;
570−
571− /* HL_INFO_* */
572587 __u32 op;
573588
574589 union {
575− /* Dcore id for which the information is relevant.
576− * For Gaudi refer to 'enum gaudi_dcores'
577− */
578590 __u32 dcore_id;
579− /* Context ID - Currently not in use */
580591 __u32 ctx_id;
581− /* Period value for utilization rate (100ms - 1000ms, in 100ms
582− * resolution.
583− */
584592 __u32 period_ms;
585− /* PLL frequency retrieval */
586593 __u32 pll_index;
587594 };
588595