2018-09-25 12:14:30

by Andrea Parri

[permalink] [raw]
Subject: [PATCH trivial 0/2] h8300, riscv: Remove smp_mb__{before,after}_clear_bit()

A trivial clean-up, removing the (now obsolete) definitions of the two
barriers. (smp_mb__{before,after}_atomic() can serve similar purposes.)

Andrea

Cc: Yoshinori Sato <[email protected]>
Cc: <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: Albert Ou <[email protected]>
Cc: <[email protected]>

Andrea Parri (2):
riscv/bitops: Remove smp_mb__{before,after}_clear_bit()
h8300/bitops: Remove smp_mb__{before,after}_clear_bit()

arch/h8300/include/asm/bitops.h | 6 ------
arch/riscv/include/asm/bitops.h | 5 -----
2 files changed, 11 deletions(-)

--
2.17.1



2018-09-25 12:13:46

by Andrea Parri

[permalink] [raw]
Subject: [PATCH 1/2] riscv/bitops: Remove smp_mb__{before,after}_clear_bit()

The barriers are unused; remove their definition.

Signed-off-by: Andrea Parri <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: Albert Ou <[email protected]>
Cc: <[email protected]>
---
arch/riscv/include/asm/bitops.h | 5 -----
1 file changed, 5 deletions(-)

diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitops.h
index f30daf26f08f4..01db98dfd0435 100644
--- a/arch/riscv/include/asm/bitops.h
+++ b/arch/riscv/include/asm/bitops.h
@@ -23,11 +23,6 @@
#include <asm/barrier.h>
#include <asm/bitsperlong.h>

-#ifndef smp_mb__before_clear_bit
-#define smp_mb__before_clear_bit() smp_mb()
-#define smp_mb__after_clear_bit() smp_mb()
-#endif /* smp_mb__before_clear_bit */
-
#include <asm-generic/bitops/__ffs.h>
#include <asm-generic/bitops/ffz.h>
#include <asm-generic/bitops/fls.h>
--
2.17.1


2018-09-25 12:13:59

by Andrea Parri

[permalink] [raw]
Subject: [PATCH 2/2] h8300/bitops: Remove smp_mb__{before,after}_clear_bit()

The barriers are unused; remove their definition.

Signed-off-by: Andrea Parri <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Cc: <[email protected]>
---
arch/h8300/include/asm/bitops.h | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bitops.h
index 647a83bd40b70..7aa16c732aa9f 100644
--- a/arch/h8300/include/asm/bitops.h
+++ b/arch/h8300/include/asm/bitops.h
@@ -51,12 +51,6 @@ static inline void FNAME(int nr, volatile unsigned long *addr) \
} \
}

-/*
- * clear_bit() doesn't provide any barrier for the compiler.
- */
-#define smp_mb__before_clear_bit() barrier()
-#define smp_mb__after_clear_bit() barrier()
-
H8300_GEN_BITOP(set_bit, "bset")
H8300_GEN_BITOP(clear_bit, "bclr")
H8300_GEN_BITOP(change_bit, "bnot")
--
2.17.1


2018-09-25 17:20:15

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH 1/2] riscv/bitops: Remove smp_mb__{before,after}_clear_bit()

On Tue, 25 Sep 2018 05:12:24 PDT (-0700), [email protected] wrote:
> The barriers are unused; remove their definition.
>
> Signed-off-by: Andrea Parri <[email protected]>
> Cc: Palmer Dabbelt <[email protected]>
> Cc: Albert Ou <[email protected]>
> Cc: <[email protected]>
> ---
> arch/riscv/include/asm/bitops.h | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitops.h
> index f30daf26f08f4..01db98dfd0435 100644
> --- a/arch/riscv/include/asm/bitops.h
> +++ b/arch/riscv/include/asm/bitops.h
> @@ -23,11 +23,6 @@
> #include <asm/barrier.h>
> #include <asm/bitsperlong.h>
>
> -#ifndef smp_mb__before_clear_bit
> -#define smp_mb__before_clear_bit() smp_mb()
> -#define smp_mb__after_clear_bit() smp_mb()
> -#endif /* smp_mb__before_clear_bit */
> -
> #include <asm-generic/bitops/__ffs.h>
> #include <asm-generic/bitops/ffz.h>
> #include <asm-generic/bitops/fls.h>

Reviewed-by: Palmer Dabbelt <[email protected]>

Do you want me to take this via the RISC-V tree? I only ended up with patch
1/2 in my inbox, and I probably shouldn't take both.

Thanks!

2018-09-25 17:51:15

by Andrea Parri

[permalink] [raw]
Subject: Re: [PATCH 1/2] riscv/bitops: Remove smp_mb__{before,after}_clear_bit()

On Tue, Sep 25, 2018 at 10:19:24AM -0700, Palmer Dabbelt wrote:
> On Tue, 25 Sep 2018 05:12:24 PDT (-0700), [email protected] wrote:
> > The barriers are unused; remove their definition.
> >
> > Signed-off-by: Andrea Parri <[email protected]>
> > Cc: Palmer Dabbelt <[email protected]>
> > Cc: Albert Ou <[email protected]>
> > Cc: <[email protected]>
> > ---
> > arch/riscv/include/asm/bitops.h | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitops.h
> > index f30daf26f08f4..01db98dfd0435 100644
> > --- a/arch/riscv/include/asm/bitops.h
> > +++ b/arch/riscv/include/asm/bitops.h
> > @@ -23,11 +23,6 @@
> > #include <asm/barrier.h>
> > #include <asm/bitsperlong.h>
> >
> > -#ifndef smp_mb__before_clear_bit
> > -#define smp_mb__before_clear_bit() smp_mb()
> > -#define smp_mb__after_clear_bit() smp_mb()
> > -#endif /* smp_mb__before_clear_bit */
> > -
> > #include <asm-generic/bitops/__ffs.h>
> > #include <asm-generic/bitops/ffz.h>
> > #include <asm-generic/bitops/fls.h>
>
> Reviewed-by: Palmer Dabbelt <[email protected]>

Thank you.


>
> Do you want me to take this via the RISC-V tree? I only ended up with patch
> 1/2 in my inbox, and I probably shouldn't take both.

I expected this to go via the RISC-V tree and 2/2 via the H8/300 tree,
but really no preference from me as long as they get upstreamed. ;-)

Thanks,
Andrea


>
> Thanks!

2018-09-25 17:59:29

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH 1/2] riscv/bitops: Remove smp_mb__{before,after}_clear_bit()

On Tue, 25 Sep 2018 10:49:06 PDT (-0700), [email protected] wrote:
> On Tue, Sep 25, 2018 at 10:19:24AM -0700, Palmer Dabbelt wrote:
>> On Tue, 25 Sep 2018 05:12:24 PDT (-0700), [email protected] wrote:
>> > The barriers are unused; remove their definition.
>> >
>> > Signed-off-by: Andrea Parri <[email protected]>
>> > Cc: Palmer Dabbelt <[email protected]>
>> > Cc: Albert Ou <[email protected]>
>> > Cc: <[email protected]>
>> > ---
>> > arch/riscv/include/asm/bitops.h | 5 -----
>> > 1 file changed, 5 deletions(-)
>> >
>> > diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitops.h
>> > index f30daf26f08f4..01db98dfd0435 100644
>> > --- a/arch/riscv/include/asm/bitops.h
>> > +++ b/arch/riscv/include/asm/bitops.h
>> > @@ -23,11 +23,6 @@
>> > #include <asm/barrier.h>
>> > #include <asm/bitsperlong.h>
>> >
>> > -#ifndef smp_mb__before_clear_bit
>> > -#define smp_mb__before_clear_bit() smp_mb()
>> > -#define smp_mb__after_clear_bit() smp_mb()
>> > -#endif /* smp_mb__before_clear_bit */
>> > -
>> > #include <asm-generic/bitops/__ffs.h>
>> > #include <asm-generic/bitops/ffz.h>
>> > #include <asm-generic/bitops/fls.h>
>>
>> Reviewed-by: Palmer Dabbelt <[email protected]>
>
> Thank you.
>
>
>>
>> Do you want me to take this via the RISC-V tree? I only ended up with patch
>> 1/2 in my inbox, and I probably shouldn't take both.
>
> I expected this to go via the RISC-V tree and 2/2 via the H8/300 tree,
> but really no preference from me as long as they get upstreamed. ;-)

Works for me. I'll take this one.