Skip to content

Commit a19eaf8

Browse files
Iouri Tarassovchessturo
authored andcommitted
drivers: hv: dxgkrnl: Fixed dxgkrnl to build for the 6.1 kernel
Definition for GPADL was changed from u32 to struct vmbus_gpadl. Signed-off-by: Iouri Tarassov <iourit@linux.microsoft.com> [kms: forward port to 6.6 from 6.1. No code changes made.] Signed-off-by: Kelsey Steele <kelseysteele@microsoft.com>
1 parent fe81dd4 commit a19eaf8

3 files changed

Lines changed: 0 additions & 20 deletions

File tree

drivers/hv/dxgkrnl/dxgadapter.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -927,19 +927,11 @@ void dxgallocation_destroy(struct dxgallocation *alloc)
927927
alloc->owner.device,
928928
&args, &alloc->alloc_handle);
929929
}
930-
#ifdef _MAIN_KERNEL_
931930
if (alloc->gpadl.gpadl_handle) {
932931
DXG_TRACE("Teardown gpadl %d", alloc->gpadl.gpadl_handle);
933932
vmbus_teardown_gpadl(dxgglobal_get_vmbus(), &alloc->gpadl);
934933
alloc->gpadl.gpadl_handle = 0;
935934
}
936-
#else
937-
if (alloc->gpadl) {
938-
DXG_TRACE("Teardown gpadl %d", alloc->gpadl);
939-
vmbus_teardown_gpadl(dxgglobal_get_vmbus(), alloc->gpadl);
940-
alloc->gpadl = 0;
941-
}
942-
#endif
943935
if (alloc->priv_drv_data)
944936
vfree(alloc->priv_drv_data);
945937
if (alloc->cpu_address_mapped)

drivers/hv/dxgkrnl/dxgkrnl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,7 @@ struct dxgallocation {
728728
u32 cached:1;
729729
u32 handle_valid:1;
730730
/* GPADL address list for existing sysmem allocations */
731-
#ifdef _MAIN_KERNEL_
732731
struct vmbus_gpadl gpadl;
733-
#else
734-
u32 gpadl;
735-
#endif
736732
/* Number of pages in the 'pages' array */
737733
u32 num_pages;
738734
/*

drivers/hv/dxgkrnl/dxgvmbus.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,22 +1493,14 @@ int create_existing_sysmem(struct dxgdevice *device,
14931493
ret = -ENOMEM;
14941494
goto cleanup;
14951495
}
1496-
#ifdef _MAIN_KERNEL_
14971496
DXG_TRACE("New gpadl %d", dxgalloc->gpadl.gpadl_handle);
1498-
#else
1499-
DXG_TRACE("New gpadl %d", dxgalloc->gpadl);
1500-
#endif
15011497

15021498
command_vgpu_to_host_init2(&set_store_command->hdr,
15031499
DXGK_VMBCOMMAND_SETEXISTINGSYSMEMSTORE,
15041500
device->process->host_handle);
15051501
set_store_command->device = device->handle;
15061502
set_store_command->allocation = host_alloc->allocation;
1507-
#ifdef _MAIN_KERNEL_
15081503
set_store_command->gpadl = dxgalloc->gpadl.gpadl_handle;
1509-
#else
1510-
set_store_command->gpadl = dxgalloc->gpadl;
1511-
#endif
15121504
ret = dxgvmb_send_sync_msg_ntstatus(msg.channel, msg.hdr,
15131505
msg.size);
15141506
if (ret < 0)

0 commit comments

Comments
 (0)