similar to: [PATCH 4.9 41/59] tools/virtio: fix READ_ONCE()

Displaying 20 results from an estimated 9000 matches similar to: "[PATCH 4.9 41/59] tools/virtio: fix READ_ONCE()"

2016 Nov 25
0
[PATCH 1/3] tools/virtio: fix READ_ONCE()
On 2016?11?24? 18:25, Mark Rutland wrote: > The virtio tools implementation of READ_ONCE() has a single parameter called > 'var', but erroneously refers to 'val' for its cast, and thus won't work unless > there's a variable of the correct type that happens to be called 'var'. > > Fix this with s/var/val/, making READ_ONCE() work as expected
2016 Nov 24
0
[PATCH 1/3] tools/virtio: fix READ_ONCE()
The virtio tools implementation of READ_ONCE() has a single parameter called 'var', but erroneously refers to 'val' for its cast, and thus won't work unless there's a variable of the correct type that happens to be called 'var'. Fix this with s/var/val/, making READ_ONCE() work as expected regardless. Fixes: a7c490333df3cff5 ("tools/virtio: use virt_xxx
2016 Nov 24
0
[PATCH 1/3] tools/virtio: fix READ_ONCE()
On Thu, 24 Nov 2016 10:25:12 +0000 Mark Rutland <mark.rutland at arm.com> wrote: > The virtio tools implementation of READ_ONCE() has a single parameter called > 'var', but erroneously refers to 'val' for its cast, and thus won't work unless > there's a variable of the correct type that happens to be called 'var'. > > Fix this with s/var/val/,
2020 Jul 02
2
[PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation
On Thu, Jul 2, 2020 at 11:48 AM Will Deacon <will at kernel.org> wrote: > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > > -#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory") > > > +#define __smp_load_acquire(p)
2020 Jul 02
2
[PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation
On Thu, Jul 2, 2020 at 11:48 AM Will Deacon <will at kernel.org> wrote: > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > > -#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory") > > > +#define __smp_load_acquire(p)
2020 Jul 02
0
[PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation
On Thu, Jul 02, 2020 at 12:08:41PM +0200, Arnd Bergmann wrote: > On Thu, Jul 2, 2020 at 11:48 AM Will Deacon <will at kernel.org> wrote: > > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > > > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > > > -#define read_barrier_depends() __asm__ __volatile__("mb": :
2016 Nov 24
12
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
For several reasons, it would be beneficial to kill off ACCESS_ONCE() tree-wide, in favour of {READ,WRITE}_ONCE(). These work with aggregate types, more obviously document their intended behaviour, and are necessary for tools like KTSAN to work correctly (as otherwise reads and writes cannot be instrumented separately). While it's possible to script the bulk of this tree-wide conversion, some
2016 Nov 24
12
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
For several reasons, it would be beneficial to kill off ACCESS_ONCE() tree-wide, in favour of {READ,WRITE}_ONCE(). These work with aggregate types, more obviously document their intended behaviour, and are necessary for tools like KTSAN to work correctly (as otherwise reads and writes cannot be instrumented separately). While it's possible to script the bulk of this tree-wide conversion, some
2020 Jul 02
0
[PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation
On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > -#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory") > > +#define __smp_load_acquire(p) \ > > +({ \ > > + __unqual_scalar_typeof(*p) ___p1 = \ > > + (*(volatile typeof(___p1) *)(p));
2016 Nov 25
0
[PATCH 3/3] tools/virtio: use {READ,WRITE}_ONCE() in uaccess.h
On 2016?11?24? 18:25, Mark Rutland wrote: > As a step towards killing off ACCESS_ONCE, use {READ,WRITE}_ONCE() for the > virtio tools uaccess primitives, pulling these in from <linux/compiler.h>. > > With this done, we can kill off the now-unused ACCESS_ONCE() definition. > > Signed-off-by: Mark Rutland <mark.rutland at arm.com> > Cc: Jason Wang <jasowang at
2020 Jul 02
2
[PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation
On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > Rather then relying on the core code to use smp_read_barrier_depends() > as part of the READ_ONCE() definition, instead override __READ_ONCE() > in the Alpha code so that it is treated the same way as > smp_load_acquire(). > > Acked-by: Paul E. McKenney <paulmck at kernel.org> > Signed-off-by: Will Deacon
2020 Jul 02
2
[PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation
On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > Rather then relying on the core code to use smp_read_barrier_depends() > as part of the READ_ONCE() definition, instead override __READ_ONCE() > in the Alpha code so that it is treated the same way as > smp_load_acquire(). > > Acked-by: Paul E. McKenney <paulmck at kernel.org> > Signed-off-by: Will Deacon
2016 Nov 24
0
[PATCH 3/3] tools/virtio: use {READ,WRITE}_ONCE() in uaccess.h
As a step towards killing off ACCESS_ONCE, use {READ,WRITE}_ONCE() for the virtio tools uaccess primitives, pulling these in from <linux/compiler.h>. With this done, we can kill off the now-unused ACCESS_ONCE() definition. Signed-off-by: Mark Rutland <mark.rutland at arm.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Michael S. Tsirkin <mst at redhat.com> Cc:
2016 Nov 25
2
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 3:56 PM, Boqun Feng <boqun.feng at gmail.com> wrote: > On Fri, Nov 25, 2016 at 01:44:04PM +0100, Peter Zijlstra wrote: >> On Fri, Nov 25, 2016 at 01:40:44PM +0100, Peter Zijlstra wrote: >> > #define SINGLE_LOAD(x) \ >> > {( \ >> >
2016 Nov 25
2
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 3:56 PM, Boqun Feng <boqun.feng at gmail.com> wrote: > On Fri, Nov 25, 2016 at 01:44:04PM +0100, Peter Zijlstra wrote: >> On Fri, Nov 25, 2016 at 01:40:44PM +0100, Peter Zijlstra wrote: >> > #define SINGLE_LOAD(x) \ >> > {( \ >> >
2016 Nov 25
0
[PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()
On Fri, Nov 25, 2016 at 12:23:56PM +0000, Mark Rutland wrote: > Naming will be problematic; calling them ATOMIC_* makes tham sound like > they work on atomic_t. That and I have no idea how to ensure correct > usage tree-wide; I'm not sure if/how Coccinelle can help. > > Peter, thoughts? Something like so perhaps? --- #ifdef CONFIG_DEBUG_ATOMIC_SLEEP #define
2016 Jan 20
0
[PATCH] tools/virtio: use virt_xxx barriers
Fix build after API changes. Reported-by: Kamal Mostafa <kamal at canonical.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- tools/virtio/asm/barrier.h | 22 +++++++++++++--------- tools/virtio/linux/compiler.h | 9 +++++++++ tools/virtio/linux/kernel.h | 1 + 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 tools/virtio/linux/compiler.h
2016 Jan 20
0
[PATCH] tools/virtio: use virt_xxx barriers
Fix build after API changes. Reported-by: Kamal Mostafa <kamal at canonical.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- tools/virtio/asm/barrier.h | 22 +++++++++++++--------- tools/virtio/linux/compiler.h | 9 +++++++++ tools/virtio/linux/kernel.h | 1 + 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 tools/virtio/linux/compiler.h
2020 Jun 30
0
[PATCH 02/18] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h
In preparation for allowing architectures to define their own implementation of the READ_ONCE() macro, move the generic {READ,WRITE}_ONCE() definitions out of the unwieldy 'linux/compiler.h' file and into a new 'rwonce.h' header under 'asm-generic'. Acked-by: Paul E. McKenney <paulmck at kernel.org> Signed-off-by: Will Deacon <will at kernel.org> ---
2020 Jun 30
2
[PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y
On Tue, Jun 30, 2020 at 7:39 PM Will Deacon <will at kernel.org> wrote: > +#define __READ_ONCE(x) \ > +({ \ > + int atomic = 1; \ > + union { __unqual_scalar_typeof(x) __val; char __c[1]; } __u; \ > +