diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2013-09-18 15:39:40 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-20 14:28:16 -0400 |
commit | 328a50c7b09d313ab9278f972950da414d348eb1 (patch) | |
tree | 63491906083e3106cbb812c667567cc94515ae65 | |
parent | a7ee824a6255e347ea76e2f00827e81bbe01004e (diff) | |
download | blackbird-op-linux-328a50c7b09d313ab9278f972950da414d348eb1.tar.gz blackbird-op-linux-328a50c7b09d313ab9278f972950da414d348eb1.zip |
drm/radeon/cik: Fix printing of client name on VM protection fault
The string is encoded from the MSB to the LSB of the register.
Cc: stable@vger.kernel.org
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/radeon/cik.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index adbdb6503b05..c0714d72610b 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -4735,12 +4735,13 @@ static void cik_vm_decode_fault(struct radeon_device *rdev, u32 mc_id = (status & MEMORY_CLIENT_ID_MASK) >> MEMORY_CLIENT_ID_SHIFT; u32 vmid = (status & FAULT_VMID_MASK) >> FAULT_VMID_SHIFT; u32 protections = (status & PROTECTIONS_MASK) >> PROTECTIONS_SHIFT; - char *block = (char *)&mc_client; + char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff, + (mc_client >> 8) & 0xff, mc_client & 0xff, 0 }; - printk("VM fault (0x%02x, vmid %d) at page %u, %s from %s (%d)\n", + printk("VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n", protections, vmid, addr, (status & MEMORY_CLIENT_RW_MASK) ? "write" : "read", - block, mc_id); + block, mc_client, mc_id); } /** |