git: 901256f6ea3c - main - mlx5: jiffies is unsigned long
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Apr 2025 13:56:06 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=901256f6ea3cda2e0951b80b9be466e1b596f7fa commit 901256f6ea3cda2e0951b80b9be466e1b596f7fa Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2025-01-27 12:12:05 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-04-29 13:53:40 +0000 mlx5: jiffies is unsigned long Sponsored by: NVidia networking Differential revision: https://reviews.freebsd.org/D48878 --- sys/dev/mlx5/mlx5_core/mlx5_cmd.c | 4 ++-- sys/dev/mlx5/mlx5_core/mlx5_fw.c | 4 ++-- sys/dev/mlx5/mlx5_core/mlx5_health.c | 5 +++-- sys/dev/mlx5/mlx5_core/mlx5_main.c | 8 ++++---- sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_cmd.c b/sys/dev/mlx5/mlx5_core/mlx5_cmd.c index a961c9d7c3dd..86c721a83cb7 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_cmd.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_cmd.c @@ -247,7 +247,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent) { struct mlx5_core_dev *dev = container_of(ent->cmd, struct mlx5_core_dev, cmd); - int poll_end = jiffies + + long poll_end = jiffies + msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC + 1000); u8 own; @@ -951,7 +951,7 @@ static const char *deliv_status_to_str(u8 status) static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent) { - int timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC); + unsigned long timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC); int err; if (ent->polling) { diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fw.c b/sys/dev/mlx5/mlx5_core/mlx5_fw.c index b3a7ffb732f9..233bd4a38c91 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fw.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fw.c @@ -306,7 +306,7 @@ int mlx5_cmd_force_teardown_hca(struct mlx5_core_dev *dev) #define MLX5_FAST_TEARDOWN_WAIT_MS 3000 int mlx5_cmd_fast_teardown_hca(struct mlx5_core_dev *dev) { - int end, delay_ms = MLX5_FAST_TEARDOWN_WAIT_MS; + unsigned long end, delay_ms = MLX5_FAST_TEARDOWN_WAIT_MS; u32 out[MLX5_ST_SZ_DW(teardown_hca_out)] = {}; u32 in[MLX5_ST_SZ_DW(teardown_hca_in)] = {}; int state; @@ -343,7 +343,7 @@ int mlx5_cmd_fast_teardown_hca(struct mlx5_core_dev *dev) } while (!time_after(jiffies, end)); if (mlx5_get_nic_state(dev) != MLX5_NIC_IFC_DISABLED) { - mlx5_core_err(dev, "NIC IFC still %d after %ums.\n", + mlx5_core_err(dev, "NIC IFC still %d after %lums.\n", mlx5_get_nic_state(dev), delay_ms); return -EIO; } diff --git a/sys/dev/mlx5/mlx5_core/mlx5_health.c b/sys/dev/mlx5/mlx5_core/mlx5_health.c index f4049d23d75d..bedd51eb02e4 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_health.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_health.c @@ -265,7 +265,8 @@ mlx5_health_allow_reset(struct mlx5_core_dev *dev) #define MLX5_NIC_STATE_POLL_MS 5 void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force) { - int end, delay_ms = MLX5_CRDUMP_WAIT_MS; + unsigned long end; + int delay_ms = MLX5_CRDUMP_WAIT_MS; u32 fatal_error; int lock = -EBUSY; @@ -445,7 +446,7 @@ static void health_care(struct work_struct *work) spin_unlock_irqrestore(&health->wq_lock, flags); } -static int get_next_poll_jiffies(void) +static unsigned long get_next_poll_jiffies(void) { unsigned long next; diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 2b0c9f584088..221781327b51 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -761,8 +761,8 @@ static inline int fw_initializing(struct mlx5_core_dev *dev) static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili, u32 warn_time_mili) { - int warn = jiffies + msecs_to_jiffies(warn_time_mili); - int end = jiffies + msecs_to_jiffies(max_wait_mili); + unsigned long warn = jiffies + msecs_to_jiffies(warn_time_mili); + unsigned long end = jiffies + msecs_to_jiffies(max_wait_mili); int err = 0; MPASS(max_wait_mili > warn_time_mili); @@ -774,8 +774,8 @@ static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili, } if (warn_time_mili && time_after(jiffies, warn)) { mlx5_core_warn(dev, - "Waiting for FW initialization, timeout abort in %u s\n", - (unsigned)(jiffies_to_msecs(end - warn) / 1000)); + "Waiting for FW initialization, timeout abort in %lu s\n", + (unsigned long)(jiffies_to_msecs(end - warn) / 1000)); warn = jiffies + msecs_to_jiffies(warn_time_mili); } msleep(FW_INIT_WAIT_MS); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c index 6207442e756f..b1798f909ee5 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c @@ -519,7 +519,7 @@ enum { s64 mlx5_wait_for_reclaim_vfs_pages(struct mlx5_core_dev *dev) { - int end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS); + unsigned long end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS); s64 prevpages = 0; s64 npages = 0; @@ -557,7 +557,7 @@ static int optimal_reclaimed_pages(void) int mlx5_reclaim_startup_pages(struct mlx5_core_dev *dev) { - int end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS); + unsigned long end = jiffies + msecs_to_jiffies(MAX_RECLAIM_TIME_MSECS); struct mlx5_fw_page *fwp; struct rb_node *p; int nclaimed = 0;