Re: [PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-31 Thread Igor Stoppa
Hi Dmitry, On 31/08/18 02:04, Dmitry Safonov wrote: Probably, the one from "tools/include/linux/compiler.h" can be used in tools directory. Thank you for the advice. It seems to work now. -- igor

Re: [PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-30 Thread Dmitry Safonov
On Thu, 2018-08-30 at 23:57 +0100, Dmitry Safonov wrote: > Hi Igor, > > On Fri, 2018-08-31 at 01:34 +0300, Igor Stoppa wrote: > > BUG_ON() is unlikely() to BUG() > > This selftest runs in userspace.. > So, we should define the macro somehow, as i.e: > rseq/rseq.h:#define rseq_unlikely(x)__bui

Re: [PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-30 Thread Dmitry Safonov
Hi Igor, On Fri, 2018-08-31 at 01:34 +0300, Igor Stoppa wrote: > BUG_ON() is unlikely() to BUG() This selftest runs in userspace.. So, we should define the macro somehow, as i.e: rseq/rseq.h:#define rseq_unlikely(x)__builtin_expect(!!(x), 0) Otherwise, [selftests]$ make vm/map_populate cc

[PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-30 Thread Igor Stoppa
BUG_ON() is unlikely() to BUG() Signed-off-by: Igor Stoppa Cc: Dmitry Safonov Cc: Shuah Khan --- tools/testing/selftests/vm/map_populate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/map_populate.c b/tools/testing/selftests/vm/map_populate.c