History

habanalabs: stop using the acronym KMD

We want to stop using the acronym KMD. Therefore, replace all locations (except for register names we can't modify) where KMD is written to other terms such as "Linux kernel driver" or "Host kernel driver", etc.

Oded Gabbay committed 7 years ago

Commit 4c172bb1 parent 0996bd19 files · +88 −84Browse files

Unified · Split

9 files
  1. drivers/misc/habanalabs/asid.c +1 −1
  2. drivers/misc/habanalabs/command_buffer.c +2 −1
  3. drivers/misc/habanalabs/command_submission.c +3 −2
  4. drivers/misc/habanalabs/context.c +1 −1
  5. drivers/misc/habanalabs/goya/goya.c +11 −11
  6. drivers/misc/habanalabs/goya/goyaP.h +7 −7
  7. drivers/misc/habanalabs/habanalabs.h +16 −16
  8. drivers/misc/habanalabs/include/armcp_if.h +36 −34
  9. include/uapi/misc/habanalabs.h +11 −11
drivers/misc/habanalabs/asid.c+1−1
@@ -18,7 +18,7 @@ int hl_asid_init(struct hl_device *hdev) · 17 unmodified lines
18 18
19 mutex_init(&hdev->asid_mutex);19 mutex_init(&hdev->asid_mutex);
20 20
21 /* ASID 0 is reserved for KMD and device CPU */21 /* ASID 0 is reserved for the kernel driver and device CPU */
22 set_bit(0, hdev->asid_bitmap);22 set_bit(0, hdev->asid_bitmap);
23 23
24 return 0;24 return 0;
drivers/misc/habanalabs/command_buffer.c+2−1
@@ -397,7 +397,8 @@ struct hl_cb *hl_cb_kernel_create(struct hl_device *hdev, u32 cb_size) · 396 unmodified lines
397 rc = hl_cb_create(hdev, &hdev->kernel_cb_mgr, cb_size, &cb_handle,397 rc = hl_cb_create(hdev, &hdev->kernel_cb_mgr, cb_size, &cb_handle,
398 HL_KERNEL_ASID_ID);398 HL_KERNEL_ASID_ID);
399 if (rc) {399 if (rc) {
400 dev_err(hdev->dev, "Failed to allocate CB for KMD %d\n", rc);400 dev_err(hdev->dev,
401 "Failed to allocate CB for the kernel driver %d\n", rc);
401 return NULL;402 return NULL;
402 }403 }
403 404
drivers/misc/habanalabs/command_submission.c+3−2
@@ -409,8 +409,9 @@ static struct hl_cb *validate_queue_index(struct hl_device *hdev, · 408 unmodified lines
409 return NULL;409 return NULL;
410 }410 }
411 411
412 if (hw_queue_prop->kmd_only) {412 if (hw_queue_prop->driver_only) {
413 dev_err(hdev->dev, "Queue index %d is restricted for KMD\n",413 dev_err(hdev->dev,
414 "Queue index %d is restricted for the kernel driver\n",
414 chunk->queue_index);415 chunk->queue_index);
415 return NULL;416 return NULL;
416 } else if (hw_queue_prop->type == QUEUE_TYPE_INT) {417 } else if (hw_queue_prop->type == QUEUE_TYPE_INT) {
drivers/misc/habanalabs/context.c+1−1
@@ -128,7 +128,7 @@ int hl_ctx_init(struct hl_device *hdev, struct hl_ctx *ctx, bool is_kernel_ctx) · 127 unmodified lines
128 ctx->thread_ctx_switch_wait_token = 0;128 ctx->thread_ctx_switch_wait_token = 0;
129 129
130 if (is_kernel_ctx) {130 if (is_kernel_ctx) {
131 ctx->asid = HL_KERNEL_ASID_ID; /* KMD gets ASID 0 */131 ctx->asid = HL_KERNEL_ASID_ID; /* Kernel driver gets ASID 0 */
132 rc = hl_mmu_ctx_init(ctx);132 rc = hl_mmu_ctx_init(ctx);
133 if (rc) {133 if (rc) {
134 dev_err(hdev->dev, "Failed to init mmu ctx module\n");134 dev_err(hdev->dev, "Failed to init mmu ctx module\n");
drivers/misc/habanalabs/goya/goya.c+11−11
@@ -42,8 +42,8 @@ · 41 unmodified lines
42 * PQ, CQ and CP are not secured.42 * PQ, CQ and CP are not secured.
43 * PQ, CB and the data are on the SRAM/DRAM.43 * PQ, CB and the data are on the SRAM/DRAM.
44 *44 *
45 * Since QMAN DMA is secured, KMD is parsing the DMA CB:45 * Since QMAN DMA is secured, the driver is parsing the DMA CB:
46 * - KMD checks DMA pointer46 * - checks DMA pointer
47 * - WREG, MSG_PROT are not allowed.47 * - WREG, MSG_PROT are not allowed.
48 * - MSG_LONG/SHORT are allowed.48 * - MSG_LONG/SHORT are allowed.
49 *49 *
@@ -56,15 +56,15 @@ · 6 unmodified lines
56 * QMAN DMA: PQ, CQ and CP are secured.56 * QMAN DMA: PQ, CQ and CP are secured.
57 * MMU is set to bypass on the Secure props register of the QMAN.57 * MMU is set to bypass on the Secure props register of the QMAN.
58 * The reasons we don't enable MMU for PQ, CQ and CP are:58 * The reasons we don't enable MMU for PQ, CQ and CP are:
59 * - PQ entry is in kernel address space and KMD doesn't map it.59 * - PQ entry is in kernel address space and the driver doesn't map it.
60 * - CP writes to MSIX register and to kernel address space (completion60 * - CP writes to MSIX register and to kernel address space (completion
61 * queue).61 * queue).
62 *62 *
63 * DMA is not secured but because CP is secured, KMD still needs to parse the63 * DMA is not secured but because CP is secured, the driver still needs to parse
64 * CB, but doesn't need to check the DMA addresses.64 * the CB, but doesn't need to check the DMA addresses.
65 *65 *
66 * For QMAN DMA 0, DMA is also secured because only KMD uses this DMA and KMD66 * For QMAN DMA 0, DMA is also secured because only the driver uses this DMA and
67 * doesn't map memory in MMU.67 * the driver doesn't map memory in MMU.
68 *68 *
69 * QMAN TPC/MME: PQ, CQ and CP aren't secured (no change from MMU disabled mode)69 * QMAN TPC/MME: PQ, CQ and CP aren't secured (no change from MMU disabled mode)
70 *70 *
@@ -336,18 +336,18 @@ void goya_get_fixed_properties(struct hl_device *hdev) · 265 unmodified lines
336 336
337 for (i = 0 ; i < NUMBER_OF_EXT_HW_QUEUES ; i++) {337 for (i = 0 ; i < NUMBER_OF_EXT_HW_QUEUES ; i++) {
338 prop->hw_queues_props[i].type = QUEUE_TYPE_EXT;338 prop->hw_queues_props[i].type = QUEUE_TYPE_EXT;
339 prop->hw_queues_props[i].kmd_only = 0;339 prop->hw_queues_props[i].driver_only = 0;
340 }340 }
341 341
342 for (; i < NUMBER_OF_EXT_HW_QUEUES + NUMBER_OF_CPU_HW_QUEUES ; i++) {342 for (; i < NUMBER_OF_EXT_HW_QUEUES + NUMBER_OF_CPU_HW_QUEUES ; i++) {
343 prop->hw_queues_props[i].type = QUEUE_TYPE_CPU;343 prop->hw_queues_props[i].type = QUEUE_TYPE_CPU;
344 prop->hw_queues_props[i].kmd_only = 1;344 prop->hw_queues_props[i].driver_only = 1;
345 }345 }
346 346
347 for (; i < NUMBER_OF_EXT_HW_QUEUES + NUMBER_OF_CPU_HW_QUEUES +347 for (; i < NUMBER_OF_EXT_HW_QUEUES + NUMBER_OF_CPU_HW_QUEUES +
348 NUMBER_OF_INT_HW_QUEUES; i++) {348 NUMBER_OF_INT_HW_QUEUES; i++) {
349 prop->hw_queues_props[i].type = QUEUE_TYPE_INT;349 prop->hw_queues_props[i].type = QUEUE_TYPE_INT;
350 prop->hw_queues_props[i].kmd_only = 0;350 prop->hw_queues_props[i].driver_only = 0;
351 }351 }
352 352
353 for (; i < HL_MAX_QUEUES; i++)353 for (; i < HL_MAX_QUEUES; i++)
@@ -2853,7 +2853,7 @@ static int goya_send_job_on_qman0(struct hl_device *hdev, struct hl_cs_job *job) · 2499 unmodified lines
2853 2853
2854 if (!hdev->asic_funcs->is_device_idle(hdev, NULL, NULL)) {2854 if (!hdev->asic_funcs->is_device_idle(hdev, NULL, NULL)) {
2855 dev_err_ratelimited(hdev->dev,2855 dev_err_ratelimited(hdev->dev,
2856 "Can't send KMD job on QMAN0 because the device is not idle\n");2856 "Can't send driver job on QMAN0 because the device is not idle\n");
2857 return -EBUSY;2857 return -EBUSY;
2858 }2858 }
2859 2859
drivers/misc/habanalabs/goya/goyaP.h+7−7
@@ -70,19 +70,19 @@ · 69 unmodified lines
70 MMU_PAGE_TABLES_SIZE)70 MMU_PAGE_TABLES_SIZE)
71#define MMU_CACHE_MNG_ADDR (MMU_DRAM_DEFAULT_PAGE_ADDR + \71#define MMU_CACHE_MNG_ADDR (MMU_DRAM_DEFAULT_PAGE_ADDR + \
72 MMU_DRAM_DEFAULT_PAGE_SIZE)72 MMU_DRAM_DEFAULT_PAGE_SIZE)
73#define DRAM_KMD_END_ADDR (MMU_CACHE_MNG_ADDR + \73#define DRAM_DRIVER_END_ADDR (MMU_CACHE_MNG_ADDR + \
74 MMU_CACHE_MNG_SIZE)74 MMU_CACHE_MNG_SIZE)
75 75
76#define DRAM_BASE_ADDR_USER 0x2000000076#define DRAM_BASE_ADDR_USER 0x20000000
77 77
78#if (DRAM_KMD_END_ADDR > DRAM_BASE_ADDR_USER)78#if (DRAM_DRIVER_END_ADDR > DRAM_BASE_ADDR_USER)
79#error "KMD must reserve no more than 512MB"79#error "Driver must reserve no more than 512MB"
80#endif80#endif
81 81
82/*82/*
83 * SRAM Memory Map for KMD83 * SRAM Memory Map for Driver
84 *84 *
85 * KMD occupies KMD_SRAM_SIZE bytes from the start of SRAM. It is used for85 * Driver occupies DRIVER_SRAM_SIZE bytes from the start of SRAM. It is used for
86 * MME/TPC QMANs86 * MME/TPC QMANs
87 *87 *
88 */88 */
@@ -108,10 +108,10 @@ · 19 unmodified lines
108#define TPC7_QMAN_BASE_OFFSET (TPC6_QMAN_BASE_OFFSET + \108#define TPC7_QMAN_BASE_OFFSET (TPC6_QMAN_BASE_OFFSET + \
109 (TPC_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE))109 (TPC_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE))
110 110
111#define SRAM_KMD_RES_OFFSET (TPC7_QMAN_BASE_OFFSET + \111#define SRAM_DRIVER_RES_OFFSET (TPC7_QMAN_BASE_OFFSET + \
112 (TPC_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE))112 (TPC_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE))
113 113
114#if (SRAM_KMD_RES_OFFSET >= GOYA_KMD_SRAM_RESERVED_SIZE_FROM_START)114#if (SRAM_DRIVER_RES_OFFSET >= GOYA_KMD_SRAM_RESERVED_SIZE_FROM_START)
115#error "MME/TPC QMANs SRAM space exceeds limit"115#error "MME/TPC QMANs SRAM space exceeds limit"
116#endif116#endif
117 117
drivers/misc/habanalabs/habanalabs.h+16−16
@@ -96,12 +96,12 @@ enum hl_queue_type { · 95 unmodified lines
96/**96/**
97 * struct hw_queue_properties - queue information.97 * struct hw_queue_properties - queue information.
98 * @type: queue type.98 * @type: queue type.
99 * @kmd_only: true if only KMD is allowed to send a job to this queue, false99 * @driver_only: true if only the driver is allowed to send a job to this queue,
100 * otherwise.100 * false otherwise.
101 */101 */
102struct hw_queue_properties {102struct hw_queue_properties {
103 enum hl_queue_type type;103 enum hl_queue_type type;
104 u8 kmd_only;104 u8 driver_only;
105};105};
106 106
107/**107/**
@@ -324,7 +324,7 @@ struct hl_cs_job; · 216 unmodified lines
324#define HL_EQ_LENGTH 64324#define HL_EQ_LENGTH 64
325#define HL_EQ_SIZE_IN_BYTES (HL_EQ_LENGTH * HL_EQ_ENTRY_SIZE)325#define HL_EQ_SIZE_IN_BYTES (HL_EQ_LENGTH * HL_EQ_ENTRY_SIZE)
326 326
327/* KMD <-> ArmCP shared memory size */327/* Host <-> ArmCP shared memory size */
328#define HL_CPU_ACCESSIBLE_MEM_SIZE SZ_2M328#define HL_CPU_ACCESSIBLE_MEM_SIZE SZ_2M
329 329
330/**330/**
@@ -405,7 +405,7 @@ struct hl_cs_parser; · 74 unmodified lines
405 405
406/**406/**
407 * enum hl_pm_mng_profile - power management profile.407 * enum hl_pm_mng_profile - power management profile.
408 * @PM_AUTO: internal clock is set by KMD.408 * @PM_AUTO: internal clock is set by the Linux driver.
409 * @PM_MANUAL: internal clock is set by the user.409 * @PM_MANUAL: internal clock is set by the user.
410 * @PM_LAST: last power management type.410 * @PM_LAST: last power management type.
411 */411 */
@@ -613,7 +613,7 @@ struct hl_va_range { · 201 unmodified lines
613 * descriptor (hl_vm_phys_pg_list or hl_userptr).613 * descriptor (hl_vm_phys_pg_list or hl_userptr).
614 * @mmu_phys_hash: holds a mapping from physical address to pgt_info structure.614 * @mmu_phys_hash: holds a mapping from physical address to pgt_info structure.
615 * @mmu_shadow_hash: holds a mapping from shadow address to pgt_info structure.615 * @mmu_shadow_hash: holds a mapping from shadow address to pgt_info structure.
616 * @hpriv: pointer to the private (KMD) data of the process (fd).616 * @hpriv: pointer to the private (Kernel Driver) data of the process (fd).
617 * @hdev: pointer to the device structure.617 * @hdev: pointer to the device structure.
618 * @refcount: reference counter for the context. Context is released only when618 * @refcount: reference counter for the context. Context is released only when
619 * this hits 0l. It is incremented on CS and CS_WAIT.619 * this hits 0l. It is incremented on CS and CS_WAIT.
@@ -1185,19 +1185,19 @@ struct hl_device_idle_busy_ts { · 565 unmodified lines
1185 * @completion_queue: array of hl_cq.1185 * @completion_queue: array of hl_cq.
1186 * @cq_wq: work queue of completion queues for executing work in process context1186 * @cq_wq: work queue of completion queues for executing work in process context
1187 * @eq_wq: work queue of event queue for executing work in process context.1187 * @eq_wq: work queue of event queue for executing work in process context.
1188 * @kernel_ctx: KMD context structure.1188 * @kernel_ctx: Kernel driver context structure.
1189 * @kernel_queues: array of hl_hw_queue.1189 * @kernel_queues: array of hl_hw_queue.
1190 * @hw_queues_mirror_list: CS mirror list for TDR.1190 * @hw_queues_mirror_list: CS mirror list for TDR.
1191 * @hw_queues_mirror_lock: protects hw_queues_mirror_list.1191 * @hw_queues_mirror_lock: protects hw_queues_mirror_list.
1192 * @kernel_cb_mgr: command buffer manager for creating/destroying/handling CGs.1192 * @kernel_cb_mgr: command buffer manager for creating/destroying/handling CGs.
1193 * @event_queue: event queue for IRQ from ArmCP.1193 * @event_queue: event queue for IRQ from ArmCP.
1194 * @dma_pool: DMA pool for small allocations.1194 * @dma_pool: DMA pool for small allocations.
1195 * @cpu_accessible_dma_mem: KMD <-> ArmCP shared memory CPU address.1195 * @cpu_accessible_dma_mem: Host <-> ArmCP shared memory CPU address.
1196 * @cpu_accessible_dma_address: KMD <-> ArmCP shared memory DMA address.1196 * @cpu_accessible_dma_address: Host <-> ArmCP shared memory DMA address.
1197 * @cpu_accessible_dma_pool: KMD <-> ArmCP shared memory pool.1197 * @cpu_accessible_dma_pool: Host <-> ArmCP shared memory pool.
1198 * @asid_bitmap: holds used/available ASIDs.1198 * @asid_bitmap: holds used/available ASIDs.
1199 * @asid_mutex: protects asid_bitmap.1199 * @asid_mutex: protects asid_bitmap.
1200 * @send_cpu_message_lock: enforces only one message in KMD <-> ArmCP queue.1200 * @send_cpu_message_lock: enforces only one message in Host <-> ArmCP queue.
1201 * @debug_lock: protects critical section of setting debug mode for device1201 * @debug_lock: protects critical section of setting debug mode for device
1202 * @asic_prop: ASIC specific immutable properties.1202 * @asic_prop: ASIC specific immutable properties.
1203 * @asic_funcs: ASIC specific functions.1203 * @asic_funcs: ASIC specific functions.
@@ -1221,16 +1221,16 @@ struct hl_device_idle_busy_ts { · 17 unmodified lines
1221 * @dram_used_mem: current DRAM memory consumption.1221 * @dram_used_mem: current DRAM memory consumption.
1222 * @timeout_jiffies: device CS timeout value.1222 * @timeout_jiffies: device CS timeout value.
1223 * @max_power: the max power of the device, as configured by the sysadmin. This1223 * @max_power: the max power of the device, as configured by the sysadmin. This
1224 * value is saved so in case of hard-reset, KMD will restore this1224 * value is saved so in case of hard-reset, the driver will restore
1225 * value and update the F/W after the re-initialization1225 * this value and update the F/W after the re-initialization
1226 * @in_reset: is device in reset flow.1226 * @in_reset: is device in reset flow.
1227 * @curr_pll_profile: current PLL profile.1227 * @curr_pll_profile: current PLL profile.
1228 * @cs_active_cnt: number of active command submissions on this device (active1228 * @cs_active_cnt: number of active command submissions on this device (active
1229 * means already in H/W queues)1229 * means already in H/W queues)
1230 * @major: habanalabs KMD major.1230 * @major: habanalabs kernel driver major.
1231 * @high_pll: high PLL profile frequency.1231 * @high_pll: high PLL profile frequency.
1232 * @soft_reset_cnt: number of soft reset since KMD loading.1232 * @soft_reset_cnt: number of soft reset since the driver was loaded.
1233 * @hard_reset_cnt: number of hard reset since KMD loading.1233 * @hard_reset_cnt: number of hard reset since the driver was loaded.
1234 * @idle_busy_ts_idx: index of current entry in idle_busy_ts_arr1234 * @idle_busy_ts_idx: index of current entry in idle_busy_ts_arr
1235 * @id: device minor.1235 * @id: device minor.
1236 * @id_control: minor of the control device1236 * @id_control: minor of the control device
drivers/misc/habanalabs/include/armcp_if.h+36−34
@@ -41,33 +41,34 @@ enum pq_init_status { · 40 unmodified lines
41/*41/*
42 * ArmCP Primary Queue Packets42 * ArmCP Primary Queue Packets
43 *43 *
44 * During normal operation, KMD needs to send various messages to ArmCP,44 * During normal operation, the host's kernel driver needs to send various
45 * usually either to SET some value into a H/W periphery or to GET the current45 * messages to ArmCP, usually either to SET some value into a H/W periphery or
46 * value of some H/W periphery. For example, SET the frequency of MME/TPC and46 * to GET the current value of some H/W periphery. For example, SET the
47 * GET the value of the thermal sensor.47 * frequency of MME/TPC and GET the value of the thermal sensor.
48 *48 *
49 * These messages can be initiated either by the User application or by KMD49 * These messages can be initiated either by the User application or by the
50 * itself, e.g. power management code. In either case, the communication from50 * host's driver itself, e.g. power management code. In either case, the
51 * KMD to ArmCP will *always* be in synchronous mode, meaning that KMD will51 * communication from the host's driver to ArmCP will *always* be in
52 * send a single message and poll until the message was acknowledged and the52 * synchronous mode, meaning that the host will send a single message and poll
53 * results are ready (if results are needed).53 * until the message was acknowledged and the results are ready (if results are
54 *54 * needed).
55 * This means that only a single message can be sent at a time and KMD must55 *
56 * wait for its result before sending the next message. Having said that,56 * This means that only a single message can be sent at a time and the host's
57 * because these are control messages which are sent in a relatively low57 * driver must wait for its result before sending the next message. Having said
58 * that, because these are control messages which are sent in a relatively low
58 * frequency, this limitation seems acceptable. It's important to note that59 * frequency, this limitation seems acceptable. It's important to note that
59 * in case of multiple devices, messages to different devices *can* be sent60 * in case of multiple devices, messages to different devices *can* be sent
60 * at the same time.61 * at the same time.
61 *62 *
62 * The message, inputs/outputs (if relevant) and fence object will be located63 * The message, inputs/outputs (if relevant) and fence object will be located
63 * on the device DDR at an address that will be determined by KMD. During64 * on the device DDR at an address that will be determined by the host's driver.
64 * device initialization phase, KMD will pass to ArmCP that address. Most of65 * During device initialization phase, the host will pass to ArmCP that address.
65 * the message types will contain inputs/outputs inside the message itself.66 * Most of the message types will contain inputs/outputs inside the message
66 * The common part of each message will contain the opcode of the message (its67 * itself. The common part of each message will contain the opcode of the
67 * type) and a field representing a fence object.68 * message (its type) and a field representing a fence object.
68 *69 *
69 * When KMD wishes to send a message to ArmCP, it will write the message70 * When the host's driver wishes to send a message to ArmCP, it will write the
70 * contents to the device DDR, clear the fence object and then write the71 * message contents to the device DDR, clear the fence object and then write the
71 * value 484 to the mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR register to issue72 * value 484 to the mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR register to issue
72 * the 484 interrupt-id to the ARM core.73 * the 484 interrupt-id to the ARM core.
73 *74 *
@@ -78,12 +79,13 @@ enum pq_init_status { · 4 unmodified lines
78 * device DDR and then write to the fence object. If an error occurred, ArmCP79 * device DDR and then write to the fence object. If an error occurred, ArmCP
79 * will fill the rc field with the right error code.80 * will fill the rc field with the right error code.
80 *81 *
81 * In the meantime, KMD will poll on the fence object. Once KMD sees that the82 * In the meantime, the host's driver will poll on the fence object. Once the
82 * fence object is signaled, it will read the results from the device DDR83 * host sees that the fence object is signaled, it will read the results from
83 * (if relevant) and resume the code execution in KMD.84 * the device DDR (if relevant) and resume the code execution in the host's
85 * driver.
84 *86 *
85 * To use QMAN packets, the opcode must be the QMAN opcode, shifted by 887 * To use QMAN packets, the opcode must be the QMAN opcode, shifted by 8
86 * so the value being put by the KMD matches the value read by ArmCP88 * so the value being put by the host's driver matches the value read by ArmCP
87 *89 *
88 * Non-QMAN packets should be limited to values 1 through (2^8 - 1)90 * Non-QMAN packets should be limited to values 1 through (2^8 - 1)
89 *91 *
@@ -148,9 +150,9 @@ enum pq_init_status { · 58 unmodified lines
148 *150 *
149 * ARMCP_PACKET_INFO_GET -151 * ARMCP_PACKET_INFO_GET -
150 * Fetch information from the device as specified in the packet's152 * Fetch information from the device as specified in the packet's
151 * structure. KMD passes the max size it allows the ArmCP to write to153 * structure. The host's driver passes the max size it allows the ArmCP to
152 * the structure, to prevent data corruption in case of mismatched154 * write to the structure, to prevent data corruption in case of
153 * KMD/FW versions.155 * mismatched driver/FW versions.
154 *156 *
155 * ARMCP_PACKET_FLASH_PROGRAM_REMOVED - this packet was removed157 * ARMCP_PACKET_FLASH_PROGRAM_REMOVED - this packet was removed
156 *158 *
@@ -183,9 +185,9 @@ enum pq_init_status { · 26 unmodified lines
183 * ARMCP_PACKET_EEPROM_DATA_GET -185 * ARMCP_PACKET_EEPROM_DATA_GET -
184 * Get EEPROM data from the ArmCP kernel. The buffer is specified in the186 * Get EEPROM data from the ArmCP kernel. The buffer is specified in the
185 * addr field. The CPU will put the returned data size in the result187 * addr field. The CPU will put the returned data size in the result
186 * field. In addition, KMD passes the max size it allows the ArmCP to188 * field. In addition, the host's driver passes the max size it allows the
187 * write to the structure, to prevent data corruption in case of189 * ArmCP to write to the structure, to prevent data corruption in case of
188 * mismatched KMD/FW versions.190 * mismatched driver/FW versions.
189 *191 *
190 */192 */
191 193
@@ -231,7 +233,7 @@ struct armcp_packet { · 39 unmodified lines
231 233
232 __le32 ctl;234 __le32 ctl;
233 235
234 __le32 fence; /* Signal to KMD that message is completed */236 __le32 fence; /* Signal to host that message is completed */
235 237
236 union {238 union {
237 struct {/* For temperature/current/voltage/fan/pwm get/set */239 struct {/* For temperature/current/voltage/fan/pwm get/set */
@@ -320,7 +322,7 @@ struct armcp_sensor { · 82 unmodified lines
320};322};
321 323
322/**324/**
323 * struct armcp_info - host driver's necessary info from ArmCP.325 * struct armcp_info - Info from ArmCP that is necessary to the host's driver
324 * @sensors: available sensors description.326 * @sensors: available sensors description.
325 * @kernel_version: ArmCP linux kernel version.327 * @kernel_version: ArmCP linux kernel version.
326 * @reserved: reserved field.328 * @reserved: reserved field.
include/uapi/misc/habanalabs.h+11−11
@@ -1,6 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
2 *2 *
3 * Copyright 2016-2018 HabanaLabs, Ltd.3 * Copyright 2016-2019 HabanaLabs, Ltd.
4 * All Rights Reserved.4 * All Rights Reserved.
5 *5 *
6 */6 */
@@ -329,12 +329,12 @@ struct hl_mem_in { · 322 unmodified lines
329 struct {329 struct {
330 /*330 /*
331 * Requested virtual address of mapped memory.331 * Requested virtual address of mapped memory.
332 * KMD will try to map the requested region to this332 * The driver will try to map the requested region to
333 * hint address, as long as the address is valid and333 * this hint address, as long as the address is valid
334 * not already mapped. The user should check the334 * and not already mapped. The user should check the
335 * returned address of the IOCTL to make sure he got335 * returned address of the IOCTL to make sure he got
336 * the hint address. Passing 0 here means that KMD336 * the hint address. Passing 0 here means that the
337 * will choose the address itself.337 * driver will choose the address itself.
338 */338 */
339 __u64 hint_addr;339 __u64 hint_addr;
340 /* Handle returned from HL_MEM_OP_ALLOC */340 /* Handle returned from HL_MEM_OP_ALLOC */
@@ -347,12 +347,12 @@ struct hl_mem_in { · 6 unmodified lines
347 __u64 host_virt_addr;347 __u64 host_virt_addr;
348 /*348 /*
349 * Requested virtual address of mapped memory.349 * Requested virtual address of mapped memory.
350 * KMD will try to map the requested region to this350 * The driver will try to map the requested region to
351 * hint address, as long as the address is valid and351 * this hint address, as long as the address is valid
352 * not already mapped. The user should check the352 * and not already mapped. The user should check the
353 * returned address of the IOCTL to make sure he got353 * returned address of the IOCTL to make sure he got
354 * the hint address. Passing 0 here means that KMD354 * the hint address. Passing 0 here means that the
355 * will choose the address itself.355 * driver will choose the address itself.
356 */356 */
357 __u64 hint_addr;357 __u64 hint_addr;
358 /* Size of allocated host memory */358 /* Size of allocated host memory */