summaryrefslogtreecommitdiff
path: root/include/net/mana/mana.h
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2024-06-17 13:17:26 -0700
committerJakub Kicinski <kuba@kernel.org>2024-06-18 18:21:18 -0700
commit382d1741b5b2feffef7942dd074206372afe1a96 (patch)
treeb303eb04982881fcddbc510c22697a7437103062 /include/net/mana/mana.h
parent2c6a4b969c1fb8277421374caa5299a6620b5691 (diff)
net: mana: Add support for page sizes other than 4KB on ARM64
As defined by the MANA Hardware spec, the queue size for DMA is 4KB minimal, and power of 2. And, the HWC queue size has to be exactly 4KB. To support page sizes other than 4KB on ARM64, define the minimal queue size as a macro separately from the PAGE_SIZE, which we always assumed it to be 4KB before supporting ARM64. Also, add MANA specific macros and update code related to size alignment, DMA region calculations, etc. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/1718655446-6576-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/mana/mana.h')
-rw-r--r--include/net/mana/mana.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
index 59823901b74f..e39b8676fe54 100644
--- a/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -42,7 +42,8 @@ enum TRI_STATE {
#define MAX_SEND_BUFFERS_PER_QUEUE 256
-#define EQ_SIZE (8 * PAGE_SIZE)
+#define EQ_SIZE (8 * MANA_PAGE_SIZE)
+
#define LOG2_EQ_THROTTLE 3
#define MAX_PORTS_IN_MANA_DEV 256