diff options
author | Oded Gabbay <oded.gabbay@amd.com> | 2014-06-10 00:14:37 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2014-06-10 00:14:37 +0300 |
commit | 55e94566e0bd799ad91287afcb222b65d0dde947 (patch) | |
tree | 8996cd5d8c276c5a5d0be369fb58a5893df83d44 | |
parent | 505cc63f35c81aa52e8ad9c87ab629e82b6a0c80 (diff) |
hsa/radeon: Don't verify cksum when parsing CRAT table
This patch removes the checksum verification done when
parsing a CRAT table. The verification was both erronous and
redundant, as it is done by another piece of kernel code.
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
-rw-r--r-- | drivers/gpu/hsa/radeon/kfd_topology.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/drivers/gpu/hsa/radeon/kfd_topology.c b/drivers/gpu/hsa/radeon/kfd_topology.c index 7e697a8594d1..b7bb09ba3bec 100644 --- a/drivers/gpu/hsa/radeon/kfd_topology.c +++ b/drivers/gpu/hsa/radeon/kfd_topology.c @@ -38,21 +38,6 @@ static struct kfd_system_properties sys_props; static DECLARE_RWSEM(topology_lock); - -static uint8_t checksum_image(const void *buf, size_t len) -{ - uint8_t *p = (uint8_t *)buf; - uint8_t sum = 0; - - if (!buf) - return 0; - - while (len-- > 0) - sum += *p++; - - return sum; - } - struct kfd_dev *radeon_kfd_device_by_id(uint32_t gpu_id) { struct kfd_topology_device *top_dev; @@ -97,9 +82,9 @@ static int kfd_topology_get_crat_acpi(void *crat_image, size_t *size) if (!size) return -EINVAL; -/* + /* * Fetch the CRAT table from ACPI - */ + */ status = acpi_get_table(CRAT_SIGNATURE, 0, &crat_table); if (status == AE_NOT_FOUND) { pr_warn("CRAT table not found\n"); @@ -110,16 +95,6 @@ static int kfd_topology_get_crat_acpi(void *crat_image, size_t *size) return -EINVAL; } - /* - * The checksum of the table should be verified - */ - if (checksum_image(crat_table, crat_table->length) == - crat_table->checksum) { - pr_err("Bad checksum for the CRAT table\n"); - return -EINVAL; -} - - if (*size >= crat_table->length && crat_image != 0) memcpy(crat_image, crat_table, crat_table->length); |