mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 __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. Signed-off-by: Michael S. Tsirkin <[email protected]> -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJYUxYEAAoJECgfDbjSjVRp5lgH/22HKRyb3+M+z3oH6R9rJmz5 T4y3XI4yDOTlh93VzxlrHjHNBnoWRvzV5hn6BKH6bTbSZ87TabNhfws11FKGvhER G1ipl/DvwytvvWgZ5dFdcC4x/0wpWawt2jgpEpPP33VDVkGJFEEAGj6GX10ClX99 ggrNfzUCHOAFaIWzC29i7gYMnYHIJDUqK6ycDxZebzsE/c12SNRGASxei2D+6eYC YkdVg0c/d7Wsk+ZO1ugiA6omO4UdvPAVvxUkvd4YphRikwEWH7gGuz558wiSo4VN iEMZvyYXSEjx4B2Hg8+mH63zWROEpCmaToUix9+4AF7YhkaeX5fICNdkAPdtxc8= =urXH -----END PGP SIGNATURE----- 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:
commit
ed3c5a0be3
86 changed files with 2106 additions and 280 deletions
|
|
@ -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; \
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue