Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102566688
D28576.id83655.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D28576.id83655.diff
View Options
Index: sys/dev/mlx4/mlx4_core/icm.h
===================================================================
--- sys/dev/mlx4/mlx4_core/icm.h
+++ sys/dev/mlx4/mlx4_core/icm.h
@@ -43,10 +43,8 @@
((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \
(sizeof (struct scatterlist)))
-enum {
- MLX4_ICM_PAGE_SHIFT = 12,
- MLX4_ICM_PAGE_SIZE = 1 << MLX4_ICM_PAGE_SHIFT,
-};
+#define MLX4_ICM_PAGE_SHIFT 12
+#define MLX4_ICM_PAGE_SIZE (1 << MLX4_ICM_PAGE_SHIFT)
struct mlx4_icm_chunk {
struct list_head list;
Index: sys/dev/mlx4/mlx4_core/mlx4_fw.c
===================================================================
--- sys/dev/mlx4/mlx4_core/mlx4_fw.c
+++ sys/dev/mlx4/mlx4_core/mlx4_fw.c
@@ -1707,9 +1707,11 @@
* Round up number of system pages needed in case
* MLX4_ICM_PAGE_SIZE < PAGE_SIZE.
*/
+#if MLX4_ICM_PAGE_SIZE < PAGE_SIZE
fw->fw_pages =
ALIGN(fw->fw_pages, PAGE_SIZE / MLX4_ICM_PAGE_SIZE) >>
(PAGE_SHIFT - MLX4_ICM_PAGE_SHIFT);
+#endif
mlx4_dbg(dev, "Clear int @ %llx, BAR %d\n",
(unsigned long long) fw->clr_int_base, fw->clr_int_bar);
@@ -2546,8 +2548,10 @@
* Round up number of system pages needed in case
* MLX4_ICM_PAGE_SIZE < PAGE_SIZE.
*/
+#if MLX4_ICM_PAGE_SIZE < PAGE_SIZE
*aux_pages = ALIGN(*aux_pages, PAGE_SIZE / MLX4_ICM_PAGE_SIZE) >>
(PAGE_SHIFT - MLX4_ICM_PAGE_SHIFT);
+#endif
return 0;
}
Index: sys/dev/mthca/mthca_cmd.c
===================================================================
--- sys/dev/mthca/mthca_cmd.c
+++ sys/dev/mthca/mthca_cmd.c
@@ -852,9 +852,11 @@
* Round up number of system pages needed in case
* MTHCA_ICM_PAGE_SIZE < PAGE_SIZE.
*/
+#if MTHCA_ICM_PAGE_SIZE < PAGE_SIZE
dev->fw.arbel.fw_pages =
ALIGN(dev->fw.arbel.fw_pages, PAGE_SIZE / MTHCA_ICM_PAGE_SIZE) >>
(PAGE_SHIFT - MTHCA_ICM_PAGE_SHIFT);
+#endif
mthca_dbg(dev, "Clear int @ %llx, EQ arm @ %llx, EQ set CI @ %llx\n",
(unsigned long long) dev->fw.arbel.clr_int_base,
@@ -1588,8 +1590,11 @@
* Round up number of system pages needed in case
* MTHCA_ICM_PAGE_SIZE < PAGE_SIZE.
*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wtautological-compare"
*aux_pages = ALIGN(*aux_pages, PAGE_SIZE / MTHCA_ICM_PAGE_SIZE) >>
(PAGE_SHIFT - MTHCA_ICM_PAGE_SHIFT);
+#pragma GCC diagnostic pop
return 0;
}
Index: sys/dev/mthca/mthca_memfree.h
===================================================================
--- sys/dev/mthca/mthca_memfree.h
+++ sys/dev/mthca/mthca_memfree.h
@@ -42,11 +42,9 @@
((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \
(sizeof (struct scatterlist)))
-enum {
- MTHCA_ICM_PAGE_SHIFT = 12,
- MTHCA_ICM_PAGE_SIZE = 1 << MTHCA_ICM_PAGE_SHIFT,
- MTHCA_DB_REC_PER_PAGE = MTHCA_ICM_PAGE_SIZE / 8
-};
+#define MTHCA_ICM_PAGE_SHIFT 12
+#define MTHCA_ICM_PAGE_SIZE (1 << MTHCA_ICM_PAGE_SHIFT)
+#define MTHCA_DB_REC_PER_PAGE (MTHCA_ICM_PAGE_SIZE / 8)
struct mthca_icm_chunk {
struct list_head list;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 3:49 AM (2 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14638028
Default Alt Text
D28576.id83655.diff (2 KB)
Attached To
Mode
D28576: Silence warnings about no-op alignment operations
Attached
Detach File
Event Timeline
Log In to Comment