From: Yury Norov <yury.norov@gmail.com>
To: Palmer Dabbelt <palmer@sifive.com>
Cc: yury.norov@gmail.com, andriy.shevchenko@linux.intel.com,
akpm@linux-foundation.org, Arnd Bergmann <arnd@arndb.de>,
dmitry.torokhov@gmail.com, keescook@chromium.org,
willy@infradead.org, mpe@ellerman.id.au,
linux@rasmusvillemoes.dk, penguin-kernel@I-love.SAKURA.ne.jp,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] lib/test_bitmap: switch test_bitmap_parselist to ktime_get()
Date: Thu, 21 Feb 2019 11:53:31 +0300 [thread overview]
Message-ID: <20190221085331.GA2666@yury-thinkpad> (raw)
In-Reply-To: <mhng-e872dce6-2abe-467b-b1c1-82a59d4c93e2@palmer-si-x1c4>
On Wed, Feb 20, 2019 at 03:10:44PM -0800, Palmer Dabbelt wrote:
> On Wed, 20 Feb 2019 06:20:48 PST (-0800), yury.norov@gmail.com wrote:
> > On Wed, Feb 20, 2019 at 03:52:36PM +0200, Andy Shevchenko wrote:
> > > On Wed, Feb 20, 2019 at 03:51:01PM +0200, Andy Shevchenko wrote:
> > > > On Wed, Feb 20, 2019 at 11:37:03AM +0300, Yury Norov wrote:
> > > > > test_bitmap_parselist currently uses get_cycles which is not
> > > > > implemented on some platforms, so use ktime_get() instead.
> > > >
> > > > This sounds like a fix that should go first in the series.
> > >
> > > Ah, okay, it's already first for test module.
> > > Perhaps Fixes tag and actually one or more examples of such architectures?
> >
> > Hi Andy, thanks for your time on it.
> >
> > Only arm, arm64, openrisc, riscv and sparc64 #define get_cycles.
> > So IIUC, others take stub from include/asm-generic/timex.h.
>
> Should we (RISC-V) be doing something else? It seems odd to be in such a
> minority here, but we do have a ISA-mandated timer so the get_cycles()
> implementation is super easy.
I think you are completely fine because you are one of those who
implement get_cycles().
get_cycles() is the problem for those who use it in generic code
because their code surprisingly gets broken on some machines while
works OK on others. This is not a problem of any specific arch.
For long term, we should inspect the non-arch code and replace
get_cycles() with ktime_get() where appropriate, and avoid
introducing new get_cycles() uses.
> > sparc32, xtensa, m68k, um, and in some cases x86, mips and nios2
> > provide zero-stubs explicitly.
> >
> > Yury
> >
> > > --
> > > With Best Regards,
> > > Andy Shevchenko
> > >
next prev parent reply other threads:[~2019-02-21 8:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 8:36 [PATCH v2 0/5] lib: rework bitmap_parselist and tests Yury Norov
2019-02-20 8:37 ` [PATCH 1/6] bitmap_parselist: don't calculate length of the input string Yury Norov
2019-02-20 8:37 ` [PATCH 2/6] bitmap_parselist: move non-parser logic to helpers Yury Norov
2019-02-20 8:37 ` [PATCH 3/6] bitmap_parselist: rework input string parser Yury Norov
2019-02-20 8:37 ` [PATCH 4/6] lib/test_bitmap: switch test_bitmap_parselist to ktime_get() Yury Norov
2019-02-20 13:51 ` Andy Shevchenko
2019-02-20 13:52 ` Andy Shevchenko
2019-02-20 14:20 ` Yury Norov
2019-02-20 23:10 ` Palmer Dabbelt
2019-02-21 8:53 ` Yury Norov [this message]
2019-02-21 12:55 ` Yury Norov
2019-02-20 8:37 ` [PATCH 5/6] lib/test_bitmap: add testcases for bitmap_parselist Yury Norov
2019-02-20 8:37 ` [PATCH 6/6] lib/test_bitmap: add tests for bitmap_parselist_user Yury Norov
2019-03-15 15:53 ` [PATCH v2 0/5] lib: rework bitmap_parselist and tests Yury Norov
-- strict thread matches above, loose matches on Subject: below --
2019-03-25 21:07 [PATCH v2 RESEND 0/6] " Yury Norov
2019-03-25 21:07 ` [PATCH 4/6] lib/test_bitmap: switch test_bitmap_parselist to ktime_get() Yury Norov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190221085331.GA2666@yury-thinkpad \
--to=yury.norov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mpe@ellerman.id.au \
--cc=palmer@sifive.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.