Subject: Re: [PATCH 1/4] task_work: make task_work_add() lockless

From: Oleg Nesterov <[email-masked]>
Date: Mon, 24 Sep 2012 22:37:50 +0200

On 09/24, Geert Uytterhoeven wrote:
>
> On Sun, Aug 26, 2012 at 9:12 PM, Oleg Nesterov <[email-masked]> wrote:
> > +       while ((work = ACCESS_ONCE(*pprev))) {
> > +               read_barrier_depends();

Hmm. This should be smp_read_barrier_depends(), but this doesn't matter.

> Woops, h8300 doesn't have read_barrier_depends():
> kernel/task_work.c:38:3: error: implicit declaration of function
> 'read_barrier_depends' [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[2]: *** [kernel/task_work.o] Error 1

Thanks...

> http://kisskb.ellerman.id.au/kisskb/buildresult/7238385/
>
> Perhaps an empty definition is fine? Most architectures have:
>
> #define read_barrier_depends() do { } while(0)

Yes. arch/h8300/include/asm/barrier.h has

	#define smp_read_barrier_depends()      read_barrier_depends()

so probably it should define read_barrier_depends() as well ?

Oleg.