dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] treewide: Use DECLARE_BITMAP
@ 2015-05-20  1:37 Joe Perches
  2015-05-20  1:37 ` [PATCH 03/12] drm/amdkfd: " Joe Perches
  2015-05-20  1:37 ` [PATCH 04/12] drm/radeon: " Joe Perches
  0 siblings, 2 replies; 5+ messages in thread
From: Joe Perches @ 2015-05-20  1:37 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, dri-devel, linux-rdma,
	linux-bcache, netdev, linux-scsi, logfs
  Cc: dmaengine, linux-raid, linux-s390, linux-nfs

Use the standard method to declare a bitmap array.

Joe Perches (12):
  ARM: mach-imx: iomux-imx31: Use DECLARE_BITMAP
  dmaengine: rcar-dmac: Use DECLARE_BITMAP
  drm/amdkfd: Use DECLARE_BITMAP
  drm/radeon: Use DECLARE_BITMAP
  IB/ehca: Use DECLARE_BITMAP
  bcache: Use DECLARE_BITMAP
  spider_net: Use DECLARE_BITMAP
  s390/sclp: Use DECLARE_BITMAP
  [SCSI] qla4xxx: Use DECLARE_BITMAP
  scsi: Use DECLARE_BITMAP
  logfs: Use DECLARE_BITMAP
  sunrpc: Use DECLARE_BITMAP

 arch/arm/mach-imx/iomux-imx31.c           | 2 +-
 drivers/dma/sh/rcar-dmac.c                | 2 +-
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h     | 5 ++---
 drivers/gpu/drm/radeon/radeon.h           | 2 +-
 drivers/infiniband/hw/ehca/ipz_pt_fn.h    | 2 +-
 drivers/md/bcache/journal.c               | 2 +-
 drivers/net/ethernet/toshiba/spider_net.c | 3 +--
 drivers/s390/char/sclp_cmd.c              | 2 +-
 drivers/scsi/qla4xxx/ql4_def.h            | 2 +-
 drivers/scsi/sr.c                         | 2 +-
 fs/logfs/logfs.h                          | 2 +-
 net/sunrpc/auth_gss/svcauth_gss.c         | 2 +-
 12 files changed, 13 insertions(+), 15 deletions(-)

-- 
2.1.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 03/12] drm/amdkfd: Use DECLARE_BITMAP
  2015-05-20  1:37 [PATCH 00/12] treewide: Use DECLARE_BITMAP Joe Perches
@ 2015-05-20  1:37 ` Joe Perches
  2015-05-20  7:32   ` Oded Gabbay
  2015-05-20  1:37 ` [PATCH 04/12] drm/radeon: " Joe Perches
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2015-05-20  1:37 UTC (permalink / raw)
  To: linux-kernel, Oded Gabbay; +Cc: David Airlie, dri-devel

Use the generic mechanism to declare a bitmap instead of unsigned long.

It seems that "struct kfd_process.allocated_queue_bitmap" is unused.
Maybe it could be deleted instead.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index f21fcce..aba3e5d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -150,8 +150,7 @@ struct kfd_dev {
 
 	const struct kfd2kgd_calls *kfd2kgd;
 	struct mutex doorbell_mutex;
-	unsigned long doorbell_available_index[DIV_ROUND_UP(
-		KFD_MAX_NUM_OF_QUEUES_PER_PROCESS, BITS_PER_LONG)];
+	DECLARE_BITMAP(doorbell_available_index, KFD_MAX_NUM_OF_QUEUES_PER_PROCESS);
 
 	void *gtt_mem;
 	uint64_t gtt_start_gpu_addr;
@@ -473,7 +472,7 @@ struct kfd_process {
 	/* Size is queue_array_size, up to MAX_PROCESS_QUEUES. */
 	struct kfd_queue **queues;
 
-	unsigned long allocated_queue_bitmap[DIV_ROUND_UP(KFD_MAX_NUM_OF_QUEUES_PER_PROCESS, BITS_PER_LONG)];
+	DECLARE_BITMAP(allocated_queue_bitmap, KFD_MAX_NUM_OF_QUEUES_PER_PROCESS);
 
 	/*Is the user space process 32 bit?*/
 	bool is_32bit_user_mode;
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 04/12] drm/radeon: Use DECLARE_BITMAP
  2015-05-20  1:37 [PATCH 00/12] treewide: Use DECLARE_BITMAP Joe Perches
  2015-05-20  1:37 ` [PATCH 03/12] drm/amdkfd: " Joe Perches
@ 2015-05-20  1:37 ` Joe Perches
  2015-05-20 16:45   ` Alex Deucher
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2015-05-20  1:37 UTC (permalink / raw)
  To: linux-kernel, Alex Deucher, Christian König; +Cc: David Airlie, dri-devel

Use the generic mechanism to declare a bitmap instead of unsigned long.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpu/drm/radeon/radeon.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 46eb0fa..d556733 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -719,7 +719,7 @@ struct radeon_doorbell {
 	resource_size_t		size;
 	u32 __iomem		*ptr;
 	u32			num_doorbells;	/* Number of doorbells actually reserved for radeon. */
-	unsigned long		used[DIV_ROUND_UP(RADEON_MAX_DOORBELLS, BITS_PER_LONG)];
+	DECLARE_BITMAP(used, RADEON_MAX_DOORBELLS);
 };
 
 int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 03/12] drm/amdkfd: Use DECLARE_BITMAP
  2015-05-20  1:37 ` [PATCH 03/12] drm/amdkfd: " Joe Perches
@ 2015-05-20  7:32   ` Oded Gabbay
  0 siblings, 0 replies; 5+ messages in thread
From: Oded Gabbay @ 2015-05-20  7:32 UTC (permalink / raw)
  To: Joe Perches
  Cc: Linux-Kernel@Vger. Kernel. Org, Oded Gabbay, David Airlie,
	Maling list - DRI developers

On Wed, May 20, 2015 at 4:37 AM, Joe Perches <joe@perches.com> wrote:
> Use the generic mechanism to declare a bitmap instead of unsigned long.
>
> It seems that "struct kfd_process.allocated_queue_bitmap" is unused.
> Maybe it could be deleted instead.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index f21fcce..aba3e5d 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -150,8 +150,7 @@ struct kfd_dev {
>
>         const struct kfd2kgd_calls *kfd2kgd;
>         struct mutex doorbell_mutex;
> -       unsigned long doorbell_available_index[DIV_ROUND_UP(
> -               KFD_MAX_NUM_OF_QUEUES_PER_PROCESS, BITS_PER_LONG)];
> +       DECLARE_BITMAP(doorbell_available_index, KFD_MAX_NUM_OF_QUEUES_PER_PROCESS);
>
>         void *gtt_mem;
>         uint64_t gtt_start_gpu_addr;
> @@ -473,7 +472,7 @@ struct kfd_process {
>         /* Size is queue_array_size, up to MAX_PROCESS_QUEUES. */
>         struct kfd_queue **queues;
>
> -       unsigned long allocated_queue_bitmap[DIV_ROUND_UP(KFD_MAX_NUM_OF_QUEUES_PER_PROCESS, BITS_PER_LONG)];
> +       DECLARE_BITMAP(allocated_queue_bitmap, KFD_MAX_NUM_OF_QUEUES_PER_PROCESS);
>
>         /*Is the user space process 32 bit?*/
>         bool is_32bit_user_mode;
> --
> 2.1.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

Thanks!
I indeed deleted the allocated_queue_bitmap and squashed it into your
patch. It was a residue from a very early version.
Applied to my -next branch.

Oded

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 04/12] drm/radeon: Use DECLARE_BITMAP
  2015-05-20  1:37 ` [PATCH 04/12] drm/radeon: " Joe Perches
@ 2015-05-20 16:45   ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2015-05-20 16:45 UTC (permalink / raw)
  To: Joe Perches
  Cc: Alex Deucher, LKML, Maling list - DRI developers,
	Christian König

On Tue, May 19, 2015 at 9:37 PM, Joe Perches <joe@perches.com> wrote:
> Use the generic mechanism to declare a bitmap instead of unsigned long.
>
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to my -next tree.  thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 46eb0fa..d556733 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -719,7 +719,7 @@ struct radeon_doorbell {
>         resource_size_t         size;
>         u32 __iomem             *ptr;
>         u32                     num_doorbells;  /* Number of doorbells actually reserved for radeon. */
> -       unsigned long           used[DIV_ROUND_UP(RADEON_MAX_DOORBELLS, BITS_PER_LONG)];
> +       DECLARE_BITMAP(used, RADEON_MAX_DOORBELLS);
>  };
>
>  int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
> --
> 2.1.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-20 16:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20  1:37 [PATCH 00/12] treewide: Use DECLARE_BITMAP Joe Perches
2015-05-20  1:37 ` [PATCH 03/12] drm/amdkfd: " Joe Perches
2015-05-20  7:32   ` Oded Gabbay
2015-05-20  1:37 ` [PATCH 04/12] drm/radeon: " Joe Perches
2015-05-20 16:45   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox