Modify HW dbg thunk,to adapt to new KFD-thunk interface

Signed-off-by: Yair Shachar <yair.shachar@amd.com>
This commit is contained in:
Yair Shachar
2015-02-08 21:44:47 +02:00
committed by Oded Gabbay
parent f0a7fcccc9
commit 89188a6d6c
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -145,13 +145,13 @@ struct kfd_ioctl_dbg_unregister_args {
struct kfd_ioctl_dbg_address_watch_args {
uint32_t gpu_id; /* to KFD */
uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */
unsigned char content[0];
void *content_ptr; /* a pointer to the actual content */
};
struct kfd_ioctl_dbg_wave_control_args {
uint32_t gpu_id; /* to KFD */
uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */
unsigned char content[0];
void *content_ptr; /* a pointer to the actual content */
};
/* Matching HSA_EVENTTYPE */
+6
View File
@@ -129,6 +129,9 @@ hsaKmtDbgWavefrontControl(
unsigned char* run_ptr = (unsigned char*)args + sizeof(*args);
/* save variable content pointer for kfd */
args->content_ptr = (void *)run_ptr;
/* insert items, and increment pointer accordingly */
*((HSA_DBG_WAVEOP*)run_ptr) = Operand;
@@ -220,10 +223,13 @@ hsaKmtDbgAddressWatch(
args->gpu_id = gpu_id;
args->buf_size_in_bytes = buff_size;
/* increment pointer to the start of the non fixed part */
unsigned char* run_ptr = (unsigned char*)args + sizeof(*args);
/* save variable content pointer for kfd */
args->content_ptr = (void *)run_ptr;
/* insert items, and increment pointer accordingly */
*((HSAuint32*)run_ptr) = NumWatchPoints;