From: Oded Gabbay <oded.gabbay@gmail.com>
To: linux-kernel@vger.kernel.org, SW_Drivers@habana.ai
Subject: [PATCH 4/9] habanalabs: use standard BIT() and GENMASK()
Date: Sat, 15 Aug 2020 20:59:33 +0300 [thread overview]
Message-ID: <20200815175938.16619-4-oded.gabbay@gmail.com> (raw)
In-Reply-To: <20200815175938.16619-1-oded.gabbay@gmail.com>
Use the standard macros to define bitmasks.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
drivers/misc/habanalabs/gaudi/gaudiP.h | 44 +++++++++++++-------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/misc/habanalabs/gaudi/gaudiP.h b/drivers/misc/habanalabs/gaudi/gaudiP.h
index 5dc99f6f0296..2eb5b9330275 100644
--- a/drivers/misc/habanalabs/gaudi/gaudiP.h
+++ b/drivers/misc/habanalabs/gaudi/gaudiP.h
@@ -141,28 +141,28 @@
#define VA_HOST_SPACE_SIZE (VA_HOST_SPACE_END - \
VA_HOST_SPACE_START) /* 767TB */
-#define HW_CAP_PLL 0x00000001
-#define HW_CAP_HBM 0x00000002
-#define HW_CAP_MMU 0x00000004
-#define HW_CAP_MME 0x00000008
-#define HW_CAP_CPU 0x00000010
-#define HW_CAP_PCI_DMA 0x00000020
-#define HW_CAP_MSI 0x00000040
-#define HW_CAP_CPU_Q 0x00000080
-#define HW_CAP_HBM_DMA 0x00000100
-#define HW_CAP_CLK_GATE 0x00000200
-#define HW_CAP_SRAM_SCRAMBLER 0x00000400
-#define HW_CAP_HBM_SCRAMBLER 0x00000800
-
-#define HW_CAP_TPC0 0x01000000
-#define HW_CAP_TPC1 0x02000000
-#define HW_CAP_TPC2 0x04000000
-#define HW_CAP_TPC3 0x08000000
-#define HW_CAP_TPC4 0x10000000
-#define HW_CAP_TPC5 0x20000000
-#define HW_CAP_TPC6 0x40000000
-#define HW_CAP_TPC7 0x80000000
-#define HW_CAP_TPC_MASK 0xFF000000
+#define HW_CAP_PLL BIT(0)
+#define HW_CAP_HBM BIT(1)
+#define HW_CAP_MMU BIT(2)
+#define HW_CAP_MME BIT(3)
+#define HW_CAP_CPU BIT(4)
+#define HW_CAP_PCI_DMA BIT(5)
+#define HW_CAP_MSI BIT(6)
+#define HW_CAP_CPU_Q BIT(7)
+#define HW_CAP_HBM_DMA BIT(8)
+#define HW_CAP_CLK_GATE BIT(9)
+#define HW_CAP_SRAM_SCRAMBLER BIT(10)
+#define HW_CAP_HBM_SCRAMBLER BIT(11)
+
+#define HW_CAP_TPC0 BIT(24)
+#define HW_CAP_TPC1 BIT(25)
+#define HW_CAP_TPC2 BIT(26)
+#define HW_CAP_TPC3 BIT(27)
+#define HW_CAP_TPC4 BIT(28)
+#define HW_CAP_TPC5 BIT(29)
+#define HW_CAP_TPC6 BIT(30)
+#define HW_CAP_TPC7 BIT(31)
+#define HW_CAP_TPC_MASK GENMASK(31, 24)
#define HW_CAP_TPC_SHIFT 24
#define GAUDI_CPU_PCI_MSB_ADDR(addr) (((addr) & GENMASK_ULL(49, 39)) >> 39)
--
2.17.1
next prev parent reply other threads:[~2020-08-15 21:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-15 17:59 [PATCH 1/9] habanalabs: change CB's ID to be 64 bits Oded Gabbay
2020-08-15 17:59 ` [PATCH 2/9] habanalabs: cast int to u32 before printing it with %u Oded Gabbay
2020-08-16 15:24 ` Tomer Tayar
2020-08-15 17:59 ` [PATCH 3/9] habanalabs: eliminate redundant else condition Oded Gabbay
2020-08-16 15:24 ` Tomer Tayar
2020-08-15 17:59 ` Oded Gabbay [this message]
2020-08-16 15:24 ` [PATCH 4/9] habanalabs: use standard BIT() and GENMASK() Tomer Tayar
2020-08-15 17:59 ` [PATCH 5/9] habanalabs: use FIELD_PREP() instead of << Oded Gabbay
2020-08-16 15:24 ` Tomer Tayar
2020-08-15 17:59 ` [PATCH 6/9] habanalabs: remove redundant assignment to variable Oded Gabbay
2020-08-16 15:24 ` Tomer Tayar
2020-08-15 17:59 ` [PATCH 7/9] habanalabs: check TPC vector pipe is empty Oded Gabbay
2020-08-16 15:24 ` Tomer Tayar
2020-08-15 17:59 ` [PATCH 9/9] habanalabs: extend busy engines mask to 64 bits Oded Gabbay
2020-08-16 15:24 ` [PATCH 1/9] habanalabs: change CB's ID to be " Tomer Tayar
[not found] ` <20200815175938.16619-8-oded.gabbay@gmail.com>
2020-08-16 15:24 ` [PATCH 8/9] habanalabs: use 1U when shifting bits Tomer Tayar
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=20200815175938.16619-4-oded.gabbay@gmail.com \
--to=oded.gabbay@gmail.com \
--cc=SW_Drivers@habana.ai \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.