Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio updates from Michael Tsirkin: "virtio, vhost: new device, fixes, speedups This includes the new virtio crypto device, and fixes all over the place. In particular enabling endian-ness checks for sparse builds found some bugs which this fixes. And it appears that everyone is in agreement that disabling endian-ness sparse checks shouldn't be necessary any longer. So this enables them for everyone, and drops the __CHECK_ENDIAN__ and __bitwise__ APIs. IRQ handling in virtio has been refactored somewhat, the larger switch to IRQ_SHARED will have to wait as it proved too aggressive" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (34 commits) Makefile: drop -D__CHECK_ENDIAN__ from cflags fs/logfs: drop __CHECK_ENDIAN__ Documentation/sparse: drop __CHECK_ENDIAN__ linux: drop __bitwise__ everywhere checkpatch: replace __bitwise__ with __bitwise Documentation/sparse: drop __bitwise__ tools: enable endian checks for all sparse builds linux/types.h: enable endian checks for all sparse builds virtio_mmio: Set dev.release() to avoid warning vhost: remove unused feature bit virtio_ring: fix description of virtqueue_get_buf vhost/scsi: Remove unused but set variable tools/virtio: use {READ,WRITE}_ONCE() in uaccess.h vringh: kill off ACCESS_ONCE() tools/virtio: fix READ_ONCE() crypto: add virtio-crypto driver vhost: cache used event for better performance vsock: lookup and setup guest_cid inside vhost_vsock_lock virtio_pci: split vp_try_to_find_vqs into INTx and MSI-X variants virtio_pci: merge vp_free_vectors into vp_del_vqs ...
This commit is contained in:
@@ -42,11 +42,7 @@ typedef __s8 s8;
|
||||
#else
|
||||
#define __bitwise__
|
||||
#endif
|
||||
#ifdef __CHECK_ENDIAN__
|
||||
#define __bitwise __bitwise__
|
||||
#else
|
||||
#define __bitwise
|
||||
#endif
|
||||
|
||||
#define __force
|
||||
#define __user
|
||||
|
@@ -4,6 +4,6 @@
|
||||
#define WRITE_ONCE(var, val) \
|
||||
(*((volatile typeof(val) *)(&(var))) = (val))
|
||||
|
||||
#define READ_ONCE(var) (*((volatile typeof(val) *)(&(var))))
|
||||
#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))
|
||||
|
||||
#endif
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#ifndef UACCESS_H
|
||||
#define UACCESS_H
|
||||
extern void *__user_addr_min, *__user_addr_max;
|
||||
|
||||
#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
|
||||
#include <linux/compiler.h>
|
||||
|
||||
extern void *__user_addr_min, *__user_addr_max;
|
||||
|
||||
static inline void __chk_user_ptr(const volatile void *p, size_t size)
|
||||
{
|
||||
@@ -13,7 +14,7 @@ static inline void __chk_user_ptr(const volatile void *p, size_t size)
|
||||
({ \
|
||||
typeof(ptr) __pu_ptr = (ptr); \
|
||||
__chk_user_ptr(__pu_ptr, sizeof(*__pu_ptr)); \
|
||||
ACCESS_ONCE(*(__pu_ptr)) = x; \
|
||||
WRITE_ONCE(*(__pu_ptr), x); \
|
||||
0; \
|
||||
})
|
||||
|
||||
@@ -21,7 +22,7 @@ static inline void __chk_user_ptr(const volatile void *p, size_t size)
|
||||
({ \
|
||||
typeof(ptr) __pu_ptr = (ptr); \
|
||||
__chk_user_ptr(__pu_ptr, sizeof(*__pu_ptr)); \
|
||||
x = ACCESS_ONCE(*(__pu_ptr)); \
|
||||
x = READ_ONCE(*(__pu_ptr)); \
|
||||
0; \
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user