From ec7b3cfb47227ed7c303153e91f27168f4dd7521 Mon Sep 17 00:00:00 2001 From: Lin Bai Date: Thu, 16 May 2019 20:04:05 +0800 Subject: [PATCH] qcacmn: Fix driver loading failure on 32-bit ARM long long div on 32-bit ARM will fail the driver load by - unknown symbol __aeabi_uldivmod. Use qdf wrapped do_div() instead. Change-Id: I689a28c7ee3c7b9bfc87a6b727f2968a59231892 CRs-Fixed: 2433430 --- hif/src/hif_exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hif/src/hif_exec.c b/hif/src/hif_exec.c index abf15fdc6e67..e5cc84fdbd25 100644 --- a/hif/src/hif_exec.c +++ b/hif/src/hif_exec.c @@ -165,7 +165,7 @@ void hif_exec_fill_poll_time_histogram(struct hif_exec_context *hif_ext_group) uint32_t cpu_id = qdf_get_cpu(); poll_time_ns = sched_clock() - hif_ext_group->poll_start_time; - poll_time_us = poll_time_ns / 1000; + poll_time_us = qdf_do_div(poll_time_ns, 1000); napi_stat = &hif_ext_group->stats[cpu_id]; if (poll_time_ns > hif_ext_group->stats[cpu_id].napi_max_poll_time) @@ -275,7 +275,8 @@ void hif_print_napi_stats(struct hif_opaque_softc *hif_ctx) napi_stats->napi_completes, napi_stats->napi_workdone, napi_stats->time_limit_reached, - (napi_stats->napi_max_poll_time / 1000), + qdf_do_div(napi_stats->napi_max_poll_time, + 1000), hist_str); } }