misc: Fix db_offset calculation
authorKyle Roarty <kyleroarty1716@gmail.com>
Thu, 13 Aug 2020 22:49:34 +0000 (17:49 -0500)
committerKyle Roarty <kyleroarty1716@gmail.com>
Sat, 29 Aug 2020 01:49:49 +0000 (01:49 +0000)
commit6276d4ea6c5e7fd62aea28f882dd493415492789
treedc6a580394702754c67d5906394b12bbec72e09e
parent796d54e63bba2abc9edd27051c3b6f95fbf78984
misc: Fix db_offset calculation

db_offset used to be calculated through pointer arithmetic. Pointer
arithmetic increments the address by the size of the data type the
pointer is pointing at. In the previous db_offset calculation, that
was a uint32_t, which means the input was multiplied by 4, which is
sizeof(uint32_t)

This patch multiplies the input value by sizeof(uint32_t) before
assigning it to db_offset.

Change-Id: I9042560303ae6b8b1054b98e9a16a9da27843bb2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32678
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/hsa/hw_scheduler.cc