Re: [PATCH 1/2] include: asm-generic/atomic.h: always define atomic/atomic_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 21, 2023 at 11:43:53AM +0200, Ahmad Fatoum wrote:
> 64-bit accesses are always atomic in barebox, because we have nothing
> that would interrupt them. Thus define them unconditionally in the
> asm-generic header. This shows that an include for the s64 time is
> missing, so add that as well.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> ---
>  include/asm-generic/atomic.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
> index 45fc5da57594..27b0f73b487b 100644
> --- a/include/asm-generic/atomic.h
> +++ b/include/asm-generic/atomic.h
> @@ -8,12 +8,13 @@
>  #ifndef __ASM_GENERIC_ATOMIC_H
>  #define __ASM_GENERIC_ATOMIC_H
>  
> +#include <linux/types.h>
> +
>  #ifdef CONFIG_SMP
>  #error SMP not supported
>  #endif
>  #define ATOMIC_INIT(i)	{ (i) }
>  
> -#ifdef CONFIG_64BIT
>  typedef struct { s64 counter; } atomic64_t;
>  
>  #define atomic64_read(v)	((v)->counter)
> @@ -59,7 +60,7 @@ static inline int atomic64_add_negative(s64 i, volatile atomic64_t *v)
>  	return val < 0;
>  }
>  
> -#else
> +
>  typedef struct { volatile int counter; } atomic_t;
>  
>  #define ATOMIC_INIT(i)	{ (i) }
> @@ -114,7 +115,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
>  {
>  	*addr &= ~mask;
>  }
> -#endif
>  
>  /* Atomic operations are already serializing on ARM */
>  #define smp_mb__before_atomic_dec()	barrier()
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux