Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-27 Thread Jan Beulich
On 27.03.2024 11:28, Oleksii wrote: > On Wed, 2024-03-27 at 08:40 +0100, Jan Beulich wrote: > ... > >>> +/* This is required to provide a full barrier on success. >>> */ >>> +static inline int atomic_add_unless(atomic_t *v, int a, >>> int u) >>> +{ >>> +   int prev, rc;

Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-27 Thread Oleksii
On Wed, 2024-03-27 at 08:40 +0100, Jan Beulich wrote: ... > > > > > > +/* This is required to provide a full barrier on success. > > > > > > */ > > > > > > +static inline int atomic_add_unless(atomic_t *v, int a, > > > > > > int u) > > > > > > +{ > > > > > > +   int prev, rc; > > > > > > + > >

Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-27 Thread Jan Beulich
On 26.03.2024 20:02, Oleksii wrote: > On Mon, 2024-03-25 at 09:18 +0100, Jan Beulich wrote: >> On 22.03.2024 13:25, Oleksii wrote: >>> On Thu, 2024-03-21 at 14:03 +0100, Jan Beulich wrote: On 15.03.2024 19:06, Oleksii Kurochko wrote: > + */ > +static always_inline void read_atomic_size

Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-26 Thread Oleksii
On Tue, 2024-03-26 at 20:02 +0100, Oleksii wrote: > On Mon, 2024-03-25 at 09:18 +0100, Jan Beulich wrote: > > On 22.03.2024 13:25, Oleksii wrote: > > > On Thu, 2024-03-21 at 14:03 +0100, Jan Beulich wrote: > > > > On 15.03.2024 19:06, Oleksii Kurochko wrote: > > > > > + */ > > > > > +static always_

Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-26 Thread Oleksii
On Mon, 2024-03-25 at 09:18 +0100, Jan Beulich wrote: > On 22.03.2024 13:25, Oleksii wrote: > > On Thu, 2024-03-21 at 14:03 +0100, Jan Beulich wrote: > > > On 15.03.2024 19:06, Oleksii Kurochko wrote: > > > > + */ > > > > +static always_inline void read_atomic_size(const volatile void > > > > *p, >

Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-25 Thread Jan Beulich
On 22.03.2024 13:25, Oleksii wrote: > On Thu, 2024-03-21 at 14:03 +0100, Jan Beulich wrote: >> On 15.03.2024 19:06, Oleksii Kurochko wrote: >>> + */ >>> +static always_inline void read_atomic_size(const volatile void *p, >>> +   void *res, >>> +  

Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-22 Thread Oleksii
On Thu, 2024-03-21 at 14:03 +0100, Jan Beulich wrote: > On 15.03.2024 19:06, Oleksii Kurochko wrote: > > Initially the patch was introduced by Bobby, who takes the header > > from > > Linux kernel. > > > > The following changes were done on top of Linux kernel header: > >  - atomic##prefix##_*xchg

Re: [PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-21 Thread Jan Beulich
On 15.03.2024 19:06, Oleksii Kurochko wrote: > Initially the patch was introduced by Bobby, who takes the header from > Linux kernel. > > The following changes were done on top of Linux kernel header: > - atomic##prefix##_*xchg_*(atomic##prefix##_t *v, c_t n) were updated > to use__*xchg_gen

[PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-15 Thread Oleksii Kurochko
Initially the patch was introduced by Bobby, who takes the header from Linux kernel. The following changes were done on top of Linux kernel header: - atomic##prefix##_*xchg_*(atomic##prefix##_t *v, c_t n) were updated to use__*xchg_generic() - drop casts in write_atomic() as they are unnece