Skip to contentSkip to conversation

h8300, riscv: Remove smp_mb__{before,after}_clear_bit()

PATCH In review Andrea Parri 2 participants 6 messages Sep 25, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover 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 Palmer Dabbelt <[email protected]>
Cc Albert Ou <[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(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 riscv/bitops: Remove smp_mb__{before,after}_clear_bit()

The barriers are unused; remove their definition.

---
 arch/riscv/include/asm/bitops.h | 5 -----
 1 file changed, 5 deletions(-)
arch/riscv/include/asm/bitops.h +0 -5
index f30daf26f08f4..01db98dfd0435 100644
@@ -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>
Signature · 1 line
2.17.1
Reviewed-by on v1 1/2
#2 lore raw

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

Quoted 16 lines · andrea.parri at amarulasolutions.com

The barriers are unused; remove their definition.

---
 arch/riscv/include/asm/bitops.h | 5 -----
 1 file changed, 5 deletions(-)
arch/riscv/include/asm/bitops.h +0 -0
index f30daf26f08f4..01db98dfd0435 100644
@@ -23,11 +23,6 @@
 #include <asm/barrier.h>

arch/riscv/include/asm/bitops.h line 28

Quoted 10 lines
arch/riscv/include/asm/bitops.h +0 -5
 #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>

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!

#3 lore raw

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

Quoted 19 lines · Palmer Dabbelt
Quoted 18 lines · andrea.parri at amarulasolutions.com

The barriers are unused; remove their definition.

---
 arch/riscv/include/asm/bitops.h | 5 -----
 1 file changed, 5 deletions(-)
arch/riscv/include/asm/bitops.h +0 -0
index f30daf26f08f4..01db98dfd0435 100644
@@ -23,11 +23,6 @@
 #include <asm/barrier.h>
 #include <asm/bitsperlong.h>
 
Quoted 10 lines

arch/riscv/include/asm/bitops.h line 28

Quoted 8 lines
arch/riscv/include/asm/bitops.h +0 -5
-#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>

Thank you.

Quoted 3 lines

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

Quoted 2 lines

Thanks!

#4 lore raw

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

Quoted 35 lines · andrea.parri at amarulasolutions.com
Quoted 19 lines · Palmer Dabbelt
Quoted 18 lines · andrea.parri at amarulasolutions.com

The barriers are unused; remove their definition.

---
 arch/riscv/include/asm/bitops.h | 5 -----
 1 file changed, 5 deletions(-)
arch/riscv/include/asm/bitops.h +0 -0
index f30daf26f08f4..01db98dfd0435 100644
@@ -23,11 +23,6 @@
 #include <asm/barrier.h>
 #include <asm/bitsperlong.h>
 
Quoted 10 lines

arch/riscv/include/asm/bitops.h line 28

Quoted 8 lines
arch/riscv/include/asm/bitops.h +0 -5
-#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>

Thank you.

Quoted 1 line
Quoted 5 lines
Quoted 2 lines

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.

#5 lore raw

PATCH 2/2 h8300/bitops: Remove smp_mb__{before,after}_clear_bit()

In reply to Andrea Parri

The barriers are unused; remove their definition.

---
 arch/h8300/include/asm/bitops.h | 6 ------
 1 file changed, 6 deletions(-)
arch/h8300/include/asm/bitops.h +0 -6
index 647a83bd40b70..7aa16c732aa9f 100644
@@ -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")
Signature · 1 line
2.17.1