dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@amd.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 08/12] amdkfd: add __iomem attribute to doorbell_ptr
Date: Fri, 21 Nov 2014 10:47:16 +0200	[thread overview]
Message-ID: <1416559640-7119-6-git-send-email-oded.gabbay@amd.com> (raw)
In-Reply-To: <1416559640-7119-1-git-send-email-oded.gabbay@amd.com>

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@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2014-11-21  8:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21  8:38 [PATCH 00/12] amdkfd fixes (sparse and some more) Oded Gabbay
2014-11-21  8:43 ` [PATCH 01/12] amdkfd: Fix sparse warnings in kfd_chardev.c Oded Gabbay
2014-11-21  8:43   ` [PATCH 02/12] amdkfd: Fix sparse warnings in kfd_topology.c Oded Gabbay
2014-11-21  8:47 ` [PATCH 03/12] amdkfd: test_kq() can be static Oded Gabbay
2014-11-21  8:47   ` [PATCH 04/12] amdkfd: pqm_get_kernel_queue() " Oded Gabbay
2014-11-21  8:47   ` [PATCH 05/12] amdkfd: Fix sparse warnings in kfd_flat_memory.c Oded Gabbay
2014-11-21  8:47   ` [PATCH 06/12] amdkfd: is_occupied() can be static Oded Gabbay
2014-11-21  8:47   ` [PATCH 07/12] amdkfd: fence_wait_timeout() " Oded Gabbay
2014-11-21  8:47   ` Oded Gabbay [this message]
2014-11-21  8:49 ` [PATCH 09/12] amdkfd: Fix memory leak on process deregistration Oded Gabbay
2014-11-21  8:51 ` [PATCH 10/12] amdkfd: use schedule() in sync_with_hw Oded Gabbay
2014-11-21  8:51   ` [PATCH 11/12] amdkfd: Instead of using get function, use container_of Oded Gabbay
2014-11-21  8:52   ` [PATCH 12/12] amdkfd: Clear ctx cb before suspend Oded Gabbay
2014-11-21 15:06 ` [PATCH 00/12] amdkfd fixes (sparse and some more) Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416559640-7119-6-git-send-email-oded.gabbay@amd.com \
    --to=oded.gabbay@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox