search for: build_bug_on_zero

Displaying 17 results from an estimated 17 matches for "build_bug_on_zero".

2014 Mar 17
2
[PATCH] virtio-blk: make the queue depth configurable
...odconfig with this > now: Good idea. > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h [] > @@ -188,6 +188,9 @@ struct kparam_array > /* Default value instead of permissions? */ \ > static int __param_perm_check_##name __attribute__((unused)) = \ > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ > + /* User perms >= group perms >= other perms. */ \ > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \ > + + BUILD_BUG_ON_ZERO((((perm) >> 3) & 7) < ((perm) & 7)) \ > +...
2014 Mar 17
2
[PATCH] virtio-blk: make the queue depth configurable
...odconfig with this > now: Good idea. > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h [] > @@ -188,6 +188,9 @@ struct kparam_array > /* Default value instead of permissions? */ \ > static int __param_perm_check_##name __attribute__((unused)) = \ > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ > + /* User perms >= group perms >= other perms. */ \ > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \ > + + BUILD_BUG_ON_ZERO((((perm) >> 3) & 7) < ((perm) & 7)) \ > +...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...; diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h >> [] >> > @@ -188,6 +188,9 @@ struct kparam_array >> > /* Default value instead of permissions? */ \ >> > static int __param_perm_check_##name __attribute__((unused)) = \ >> > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ >> > + /* User perms >= group perms >= other perms. */ \ >> > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \ >> > + + BUILD_BUG_ON_ZERO((((perm) >> 3) & 7) < ((p...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...; diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h >> [] >> > @@ -188,6 +188,9 @@ struct kparam_array >> > /* Default value instead of permissions? */ \ >> > static int __param_perm_check_##name __attribute__((unused)) = \ >> > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ >> > + /* User perms >= group perms >= other perms. */ \ >> > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \ >> > + + BUILD_BUG_ON_ZERO((((perm) >> 3) & 7) < ((p...
2014 Mar 14
2
[PATCH] virtio-blk: make the queue depth configurable
On Fri, Mar 14, 2014 at 10:38:40AM -0700, Joe Perches wrote: > > +static int queue_depth = 64; > > +module_param(queue_depth, int, 444); > > 444? Really Ted? Oops, *blush*. Thanks for catching that. - Ted
2014 Mar 14
2
[PATCH] virtio-blk: make the queue depth configurable
On Fri, Mar 14, 2014 at 10:38:40AM -0700, Joe Perches wrote: > > +static int queue_depth = 64; > > +module_param(queue_depth, int, 444); > > 444? Really Ted? Oops, *blush*. Thanks for catching that. - Ted
2014 Mar 19
0
[PATCH] virtio-blk: make the queue depth configurable
...b/include/linux/moduleparam.h >>> [] >>> > @@ -188,6 +188,9 @@ struct kparam_array >>> > /* Default value instead of permissions? */ \ >>> > static int __param_perm_check_##name __attribute__((unused)) = \ >>> > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ >>> > + /* User perms >= group perms >= other perms. */ \ >>> > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \ >>> > + + BUILD_BUG_ON_ZERO((...
2014 Mar 17
0
[PATCH] virtio-blk: make the queue depth configurable
...idea. > > > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h > [] > > @@ -188,6 +188,9 @@ struct kparam_array > > /* Default value instead of permissions? */ \ > > static int __param_perm_check_##name __attribute__((unused)) = \ > > BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ > > + /* User perms >= group perms >= other perms. */ \ > > + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \ > > + + BUILD_BUG_ON_ZERO((((perm) >> 3) & 7) < ((perm) & 7...
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't understand?
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't understand?
2014 Mar 17
0
[PATCH] virtio-blk: make the queue depth configurable
....h b/include/linux/moduleparam.h index 175f6995d1af..626b85888a6b 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -188,6 +188,9 @@ struct kparam_array /* Default value instead of permissions? */ \ static int __param_perm_check_##name __attribute__((unused)) = \ BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \ + /* User perms >= group perms >= other perms. */ \ + + BUILD_BUG_ON_ZERO(((perm) >> 6) < (((perm) >> 3) & 7)) \ + + BUILD_BUG_ON_ZERO((((perm) >> 3) & 7) < ((perm) & 7)) \ + BUILD_BUG_ON_ZERO(si...
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support, but I'm pretty sure we should never allow these patches upstream. Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG. Rusty Russell (2): virtio_pci: abstract all MMIO accesses. virtio: Introducing virtio_pci.no_mmio, the worst boot option in history. drivers/virtio/virtio_pci_common.c |
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support, but I'm pretty sure we should never allow these patches upstream. Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG. Rusty Russell (2): virtio_pci: abstract all MMIO accesses. virtio: Introducing virtio_pci.no_mmio, the worst boot option in history. drivers/virtio/virtio_pci_common.c |
2019 Nov 08
0
[PATCH 01/13] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h
...typeof(x)) (val) }; \ - __write_once_size(&(x), __u.__c, sizeof(x)); \ - __u.__val; \ -}) - #endif /* __KERNEL__ */ /* @@ -356,4 +244,6 @@ static inline void *offset_to_ptr(const int *off) /* &a[0] degrades to a pointer: a different type from an array */ #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) +#include <asm/rwonce.h> + #endif /* __LINUX_COMPILER_H */ diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h index cdf016596659..7cb92286de9f 100644 --- a/include/linux/compiler_attributes.h +++ b/include/linux/compiler_at...
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2019 Nov 08
15
[PATCH 00/13] Finish off [smp_]read_barrier_depends()
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 impossible to remove altogether. Let's strike before it's too late: there's only