[PATCH] drm/virtgpu: fix double unregistration

2019-11-08 Thread Chuhong Yuan
drm_put_dev also calls drm_dev_unregister, so dev will be unregistered twice. Replace it with drm_dev_put to fix it. Signed-off-by: Chuhong Yuan --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c

Re: [PATCH 10/13] tools/memory-model: Remove smp_read_barrier_depends() from informal doc

2019-11-08 Thread Alan Stern
On Fri, 8 Nov 2019, Will Deacon wrote: > 'smp_read_barrier_depends()' has gone the way of mmiowb() and so many > esoteric memory barriers before it. Drop the two mentions of this > deceased barrier from the LKMM informal explanation document. > > Signed-off-by: Will Deacon > --- >

[PATCH 13/13] checkpatch: Remove checks relating to [smp_]read_barrier_depends()

2019-11-08 Thread Will Deacon
The '[smp_]read_barrier_depends()' macros no longer exist, so we don't need to deal with them in the checkpatch script. Signed-off-by: Will Deacon --- scripts/checkpatch.pl | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl

[PATCH 12/13] include/linux: Remove smp_read_barrier_depends() from comments

2019-11-08 Thread Will Deacon
'smp_read_barrier_depends()' doesn't exist any more, so reword the two comments that mention it to refer to "dependency ordering" instead. Signed-off-by: Will Deacon --- include/linux/percpu-refcount.h | 2 +- include/linux/ptr_ring.h| 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 08/13] locking/barriers: Remove definitions for [smp_]read_barrier_depends()

2019-11-08 Thread Will Deacon
There are no remaining users of '[smp_]read_barrier_depends()', so remove it from the generic implementation of 'barrier.h'. Signed-off-by: Will Deacon --- include/asm-generic/barrier.h | 17 - 1 file changed, 17 deletions(-) diff --git a/include/asm-generic/barrier.h

[PATCH 11/13] powerpc: Remove comment about read_barrier_depends()

2019-11-08 Thread Will Deacon
'read_barrier_depends()' doesn't exist anymore so stop talking about it. Signed-off-by: Will Deacon --- arch/powerpc/include/asm/barrier.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/asm/barrier.h index

[PATCH 09/13] Documentation/barriers: Remove references to [smp_]read_barrier_depends()

2019-11-08 Thread Will Deacon
The '[smp_]read_barrier_depends()' barrier macros no longer exist as part of the Linux memory model, so remove all references to them from the Documentation/ directory. Although this is fairly mechanical on the whole, we drop the "CACHE COHERENCY" section entirely from 'memory-barriers.txt' as it

[PATCH 07/13] alpha: Replace smp_read_barrier_depends() usage with smp_[r]mb()

2019-11-08 Thread Will Deacon
In preparation for removing 'smp_read_barrier_depends()' altogether, move the Alpha code over to using 'smp_rmb()' and 'smp_mb()' directly. Signed-off-by: Will Deacon --- arch/alpha/include/asm/atomic.h | 16 arch/alpha/include/asm/pgtable.h | 10 +- mm/memory.c

[PATCH 06/13] READ_ONCE: Remove smp_read_barrier_depends() invocation

2019-11-08 Thread Will Deacon
Alpha overrides '__read_once_size_n()' directly, so there's no need to use 'smp_read_barrier_depends()' in the core code. Signed-off-by: Will Deacon --- include/asm-generic/rwonce.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/asm-generic/rwonce.h b/include/asm-generic/rwonce.h

[PATCH 10/13] tools/memory-model: Remove smp_read_barrier_depends() from informal doc

2019-11-08 Thread Will Deacon
'smp_read_barrier_depends()' has gone the way of mmiowb() and so many esoteric memory barriers before it. Drop the two mentions of this deceased barrier from the LKMM informal explanation document. Signed-off-by: Will Deacon --- .../Documentation/explanation.txt | 26

[PATCH 05/13] alpha: Override READ_ONCE() with barriered implementation

2019-11-08 Thread Will Deacon
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()'. Signed-off-by: Will Deacon --- arch/alpha/include/asm/barrier.h | 61

[PATCH 01/13] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h

2019-11-08 Thread Will Deacon
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' and into a new 'rwonce.h' header under 'asm-generic'. Signed-off-by: Will Deacon ---

[PATCH 00/13] Finish off [smp_]read_barrier_depends()

2019-11-08 Thread Will Deacon
Hi all, Although [smp_]read_barrier_depends() became part of READ_ONCE() in commit 76ebbe78f739 ("locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()"), it still limps on in the Linux memory model with the sinister hope of attracting innocent new users so that it becomes

[PATCH 02/13] READ_ONCE: Undefine internal __READ_ONCE_SIZE macro after use

2019-11-08 Thread Will Deacon
The '__READ_ONCE_SIZE()' macro is only used as part of building 'READ_ONCE()', so undefine it once we don't need it anymore. Signed-off-by: Will Deacon --- include/asm-generic/rwonce.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/rwonce.h

[PATCH 03/13] READ_ONCE: Allow __READ_ONCE_SIZE cases to be overridden by the architecture

2019-11-08 Thread Will Deacon
The meat and potatoes of 'READ_ONCE()' is defined by the '__READ_ONCE_SIZE()' macro, which uses volatile casts in an attempt to avoid tearing of byte, halfword, word and double-word accesses. Allow this to be overridden by the architecture code in the case that things like memory barriers are also

[PATCH 04/13] vhost: Remove redundant use of read_barrier_depends() barrier

2019-11-08 Thread Will Deacon
Since commit 76ebbe78f739 ("locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()"), there is no need to use 'smp_read_barrier_depends()' outside of the Alpha architecture code. Unfortunately, there is precisely >one< user in the vhost code, and there isn't an obvious

[PATCH] vsock/virtio: fix sock refcnt holding during the shutdown

2019-11-08 Thread Stefano Garzarella
The "42f5cda5eaf4" commit rightly set SOCK_DONE on peer shutdown, but there is an issue if we receive the SHUTDOWN(RDWR) while the virtio_transport_close_timeout() is scheduled. In this case, when the timeout fires, the SOCK_DONE is already set and the virtio_transport_close_timeout() will not

Re: [PATCH 1/2] IFC hardware operation layer

2019-11-08 Thread Michael S. Tsirkin
On Tue, Nov 05, 2019 at 05:37:39PM +0800, Zhu Lingshan wrote: > This commit introduced ifcvf_base layer, which handles hardware > operations and configurations. > > Signed-off-by: Zhu Lingshan > --- > drivers/vhost/ifcvf/ifcvf_base.c | 344 > +++ >

[PATCH AUTOSEL 4.19 085/205] qxl: fix null-pointer crash during suspend

2019-11-08 Thread Sasha Levin
From: Peter Wu [ Upstream commit 7948a2b15873319d1bff4d37c09b9f2bf87b9021 ] "crtc->helper_private" is not initialized by the QXL driver and thus the "crtc_funcs->disable" call would crash (resulting in suspend failure). Fix this by converting the suspend/resume functions to use the