[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190405173211.11373-4-ynorov@marvell.com>
Date: Fri, 5 Apr 2019 20:32:09 +0300
From: Yury Norov <yury.norov@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Arnd Bergmann <arnd@...db.de>,
Kees Cook <keescook@...omium.org>,
Matthew Wilcox <willy@...radead.org>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
Mike Travis <travis@....com>
Cc: Yury Norov <ynorov@...vell.com>, Yury Norov <yury.norov@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/5] lib/test_bitmap: switch test_bitmap_parselist to ktime_get()
test_bitmap_parselist currently uses get_cycles which is not
implemented on some platforms, so use ktime_get() instead.
Signed-off-by: Yury Norov <ynorov@...vell.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
lib/test_bitmap.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index 6cd7d0740005..b06e0fd3811b 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -266,15 +266,15 @@ static void __init test_bitmap_parselist(void)
{
int i;
int err;
- cycles_t cycles;
+ ktime_t time;
DECLARE_BITMAP(bmap, 2048);
for (i = 0; i < ARRAY_SIZE(parselist_tests); i++) {
#define ptest parselist_tests[i]
- cycles = get_cycles();
+ time = ktime_get();
err = bitmap_parselist(ptest.in, bmap, ptest.nbits);
- cycles = get_cycles() - cycles;
+ time = ktime_get() - time;
if (err != ptest.errno) {
pr_err("test %d: input is %s, errno is %d, expected %d\n",
@@ -291,8 +291,7 @@ static void __init test_bitmap_parselist(void)
if (ptest.flags & PARSE_TIME)
pr_err("test %d: input is '%s' OK, Time: %llu\n",
- i, ptest.in,
- (unsigned long long)cycles);
+ i, ptest.in, time);
}
}
--
2.17.1
Powered by blists - more mailing lists