Matthew Poremba has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/33655 )
Change subject: misc: Use VPtr in hsa_driver.cc
......................................................................
misc: Use VPtr in hsa_driver.cc
This change updates HSADriver::allocateQueue to take in a ThreadContext
pointer as opposed to a PortProxy ref. This allows the TypedBufferArg
to be replaced with VPtr.
This also fixes building GCN3_X86
Change-Id: I1fea26b10c7344daf54a0cb05337e961f834a5fd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33655
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Reviewed-by: Gabe Black <gabebl...@google.com>
Reviewed-by: Matthew Poremba <matthew.pore...@amd.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/hsa/hsa_driver.cc
M src/dev/hsa/hsa_driver.hh
M src/gpu-compute/gpu_compute_driver.cc
3 files changed, 4 insertions(+), 6 deletions(-)
Approvals:
Matthew Poremba: Looks good to me, approved
Gabe Black: Looks good to me, but someone else must approve
Matt Sinclair: Looks good to me, but someone else must approve; Looks
good to me, approved
kokoro: Regressions pass
diff --git a/src/dev/hsa/hsa_driver.cc b/src/dev/hsa/hsa_driver.cc
index a1215c4..3b27149 100644
--- a/src/dev/hsa/hsa_driver.cc
+++ b/src/dev/hsa/hsa_driver.cc
@@ -101,10 +101,9 @@
* be mapped into that page.
*/
void
-HSADriver::allocateQueue(PortProxy &mem_proxy, Addr ioc_buf)
+HSADriver::allocateQueue(ThreadContext *tc, Addr ioc_buf)
{
- TypedBufferArg<kfd_ioctl_create_queue_args> args(ioc_buf);
- args.copyIn(mem_proxy);
+ VPtr<kfd_ioctl_create_queue_args> args(ioc_buf, tc);
if (queueId >= 0x1000) {
fatal("%s: Exceeded maximum number of HSA queues allowed\n",
name());
@@ -115,5 +114,4 @@
hsa_pp.setDeviceQueueDesc(args->read_pointer_address,
args->ring_base_address, args->queue_id,
args->ring_size);
- args.copyOut(mem_proxy);
}
diff --git a/src/dev/hsa/hsa_driver.hh b/src/dev/hsa/hsa_driver.hh
index abf79ab..19982f7 100644
--- a/src/dev/hsa/hsa_driver.hh
+++ b/src/dev/hsa/hsa_driver.hh
@@ -74,7 +74,7 @@
HSADevice *device;
uint32_t queueId;
- void allocateQueue(PortProxy &mem_proxy, Addr ioc_buf);
+ void allocateQueue(ThreadContext *tc, Addr ioc_buf);
};
#endif // __DEV_HSA_HSA_DRIVER_HH__
diff --git a/src/gpu-compute/gpu_compute_driver.cc
b/src/gpu-compute/gpu_compute_driver.cc
index 6bdb314..b4d65ce6 100644
--- a/src/gpu-compute/gpu_compute_driver.cc
+++ b/src/gpu-compute/gpu_compute_driver.cc
@@ -71,7 +71,7 @@
{
DPRINTF(GPUDriver, "ioctl: AMDKFD_IOC_CREATE_QUEUE\n");
- allocateQueue(virt_proxy, ioc_buf);
+ allocateQueue(tc, ioc_buf);
DPRINTF(GPUDriver, "Creating queue %d\n", queueId);
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33655
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I1fea26b10c7344daf54a0cb05337e961f834a5fd
Gerrit-Change-Number: 33655
Gerrit-PatchSet: 2
Gerrit-Owner: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Alexandru Duțu <alexandru.d...@amd.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Anthony Gutierrez <anthony.gutier...@amd.com>
Gerrit-CC: Bradford Beckmann <bradford.beckm...@gmail.com>
Gerrit-CC: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s