diff mbox series

[U-Boot,v3,3/9] riscv: Define PLATFORM__CLEAR_BIT for generic_clear_bit()

Message ID 20180430145610.18250-4-pure.logic@nexus-software.ie
State Accepted
Delegated to: Tom Rini
Headers show
Series Fixup set_bit/clear_bit definition and usage | expand

Commit Message

Bryan O'Donoghue April 30, 2018, 2:56 p.m. UTC
riscv bitops.h provides a __clear_bit() but does not define
PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the
architecturally provided __clear_bit().

This patch defines PLATFORM__CLEAR_BIT which means that __clear_bit() in
riscv bitops.h will be called whenever generic_clear_bit() is called - as
opposed to the default cross-platform generic_clear_bit().

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Rick Chen <rick@andestech.com>
Cc: Greentime Hu <green.hu@gmail.com>
---
 arch/riscv/include/asm/bitops.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini May 16, 2018, 12:50 p.m. UTC | #1
On Mon, Apr 30, 2018 at 03:56:04PM +0100, Bryan O'Donoghue wrote:

> riscv bitops.h provides a __clear_bit() but does not define
> PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the
> architecturally provided __clear_bit().
> 
> This patch defines PLATFORM__CLEAR_BIT which means that __clear_bit() in
> riscv bitops.h will be called whenever generic_clear_bit() is called - as
> opposed to the default cross-platform generic_clear_bit().
> 
> Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
> Cc: Rick Chen <rick@andestech.com>
> Cc: Greentime Hu <green.hu@gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bitops.h
index 0149e5c696..536629bbec 100644
--- a/arch/riscv/include/asm/bitops.h
+++ b/arch/riscv/include/asm/bitops.h
@@ -54,6 +54,8 @@  static inline void __clear_bit(int nr, void *addr)
 	*a &= ~mask;
 }
 
+#define PLATFORM__CLEAR_BIT
+
 static inline void __change_bit(int nr, void *addr)
 {
 	int mask;