[PATCH 08/12] amdkfd: add __iomem attribute to doorbell_ptr
Oded Gabbay
oded.gabbay at amd.com
Fri Nov 21 00:47:16 PST 2014
This patch was done due to sparse warning. It changes the definition of
doorbell_ptr in queue_properties to be with __iomem attribute, so it would
match the type which the doorbell module functions are returning.
Signed-off-by: Oded Gabbay <oded.gabbay at amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 9 ++++-----
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
index 424ddcc..5055fc9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
@@ -66,8 +66,7 @@ static bool initialize(struct kernel_queue *kq, struct kfd_dev *dev,
if (kq->mqd == NULL)
return false;
- prop.doorbell_ptr =
- (uint32_t *)kfd_get_kernel_doorbell(dev, &prop.doorbell_off);
+ prop.doorbell_ptr = kfd_get_kernel_doorbell(dev, &prop.doorbell_off);
if (prop.doorbell_ptr == NULL)
goto err_get_kernel_doorbell;
@@ -172,7 +171,7 @@ err_rptr_allocate_vidmem:
kfd2kgd->free_mem(dev->kgd, (struct kgd_mem *) kq->pq);
err_pq_allocate_vidmem:
pr_err("kfd: error init pq\n");
- kfd_release_kernel_doorbell(dev, (u32 *)prop.doorbell_ptr);
+ kfd_release_kernel_doorbell(dev, prop.doorbell_ptr);
err_get_kernel_doorbell:
pr_err("kfd: error init doorbell");
return false;
@@ -195,7 +194,7 @@ static void uninitialize(struct kernel_queue *kq)
kfd2kgd->free_mem(kq->dev->kgd, (struct kgd_mem *) kq->wptr_mem);
kfd2kgd->free_mem(kq->dev->kgd, (struct kgd_mem *) kq->pq);
kfd_release_kernel_doorbell(kq->dev,
- (u32 *)kq->queue->properties.doorbell_ptr);
+ kq->queue->properties.doorbell_ptr);
uninit_queue(kq->queue);
}
@@ -255,7 +254,7 @@ static void submit_packet(struct kernel_queue *kq)
#endif
*kq->wptr_kernel = kq->pending_wptr;
- write_kernel_doorbell((u32 *)kq->queue->properties.doorbell_ptr,
+ write_kernel_doorbell(kq->queue->properties.doorbell_ptr,
kq->pending_wptr);
}
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index 41e608d..d0bcafc 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -279,7 +279,7 @@ struct queue_properties {
uint32_t queue_percent;
uint32_t *read_ptr;
uint32_t *write_ptr;
- uint32_t *doorbell_ptr;
+ uint32_t __iomem *doorbell_ptr;
uint32_t doorbell_off;
bool is_interop;
bool is_active;
--
2.1.0
More information about the dri-devel
mailing list