Module Name: src
Committed By: riastradh
Date: Mon Aug 27 06:41:13 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: cik.c
Log Message:
No arithmetic on void *. No dropping volatile on floor.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/radeon/cik.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/radeon/cik.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/cik.c:1.5 src/sys/external/bsd/drm2/dist/drm/radeon/cik.c:1.6
--- src/sys/external/bsd/drm2/dist/drm/radeon/cik.c:1.5 Mon Aug 27 06:38:36 2018
+++ src/sys/external/bsd/drm2/dist/drm/radeon/cik.c Mon Aug 27 06:41:13 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cik.c,v 1.5 2018/08/27 06:38:36 riastradh Exp $ */
+/* $NetBSD: cik.c,v 1.6 2018/08/27 06:41:13 riastradh Exp $ */
/*
* Copyright 2012 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
* Authors: Alex Deucher
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cik.c,v 1.5 2018/08/27 06:38:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cik.c,v 1.6 2018/08/27 06:41:13 riastradh Exp $");
#include <linux/firmware.h>
#include <linux/slab.h>
@@ -6373,7 +6373,7 @@ static int cik_rlc_resume(struct radeon_
const struct rlc_firmware_header_v1_0 *hdr =
(const struct rlc_firmware_header_v1_0 *)rdev->rlc_fw->data;
const __le32 *fw_data = (const __le32 *)
- (rdev->rlc_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+ ((const char *)rdev->rlc_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
radeon_ucode_print_rlc_hdr(&hdr->header);
@@ -6869,31 +6869,31 @@ void cik_init_cp_pg_table(struct radeon_
if (me == 0) {
hdr = (const struct gfx_firmware_header_v1_0 *)rdev->ce_fw->data;
fw_data = (const __le32 *)
- (rdev->ce_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+ ((const char *)rdev->ce_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
table_offset = le32_to_cpu(hdr->jt_offset);
table_size = le32_to_cpu(hdr->jt_size);
} else if (me == 1) {
hdr = (const struct gfx_firmware_header_v1_0 *)rdev->pfp_fw->data;
fw_data = (const __le32 *)
- (rdev->pfp_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+ ((const char *)rdev->pfp_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
table_offset = le32_to_cpu(hdr->jt_offset);
table_size = le32_to_cpu(hdr->jt_size);
} else if (me == 2) {
hdr = (const struct gfx_firmware_header_v1_0 *)rdev->me_fw->data;
fw_data = (const __le32 *)
- (rdev->me_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+ ((const char *)rdev->me_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
table_offset = le32_to_cpu(hdr->jt_offset);
table_size = le32_to_cpu(hdr->jt_size);
} else if (me == 3) {
hdr = (const struct gfx_firmware_header_v1_0 *)rdev->mec_fw->data;
fw_data = (const __le32 *)
- (rdev->mec_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+ ((const char *)rdev->mec_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
table_offset = le32_to_cpu(hdr->jt_offset);
table_size = le32_to_cpu(hdr->jt_size);
} else {
hdr = (const struct gfx_firmware_header_v1_0 *)rdev->mec2_fw->data;
fw_data = (const __le32 *)
- (rdev->mec2_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+ ((const char *)rdev->mec2_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
table_offset = le32_to_cpu(hdr->jt_offset);
table_size = le32_to_cpu(hdr->jt_size);
}
@@ -7946,7 +7946,7 @@ restart_ih:
ring_index = rptr / 4;
radeon_kfd_interrupt(rdev,
- (const void *) &rdev->ih.ring[ring_index]);
+ (const volatile void *) &rdev->ih.ring[ring_index]);
src_id = le32_to_cpu(rdev->ih.ring[ring_index]) & 0xff;
src_data = le32_to_cpu(rdev->ih.ring[ring_index + 1]) & 0xfffffff;