search for: __builtin_choose_expr

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

2009 Jan 24
1
[LLVMdev] inline asm semantics: output constraint width smaller than input
...\ >> + __typeof__(*(ptr)) __ret_pu; \ >> > > This does not look right. We can sometimes have put_user() of non-integer > types (say structures). I didn't encounter it with my .config, but it is certainly possible. I think using __builtin_choose_expr would be better than the switch See a new patch at the end of this mail, using __builtin_choose_expr. [vmlinux size still same] It also includes some 32-bit stuff, but that is not complete yet. > How does the (int)__ret_pu cast work in that case? > It would fail at compile time, with a...
2009 Jan 24
0
[LLVMdev] inline asm semantics: output constraint width smaller than input
* Török Edwin <edwintorok at gmail.com> wrote: > On 2009-01-23 20:27, Török Edwin wrote: > >>> > >>> > >> i'd not mind it at all if the kernel could be built with other open-source > >> compilers too. > >> > >> Now in this case the patch you suggest might end up hurting the end result > >> so it's
2009 Jan 24
5
[LLVMdev] inline asm semantics: output constraint width smaller than input
On 2009-01-23 20:27, Török Edwin wrote: >>> >>> >> i'd not mind it at all if the kernel could be built with other open-source >> compilers too. >> >> Now in this case the patch you suggest might end up hurting the end result >> so it's not an unconditional 'yes'. But ... how much it actually matters >> depends on
2020 May 09
1
linux-next 20200508 - build failure in kernel/resource.c w/ SPARSEMEM=n
...^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:848:40: note: in definition of macro '__typecheck' (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^ ./include/linux/kernel.h:872:24: note: in expansion of macro '__safe_cmp' __builtin_choose_expr(__safe_cmp(x, y), \ ^~~~~~~~~~ ./include/linux/kernel.h:940:27: note: in expansion of macro '__careful_cmp' #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) ^~~~~~~~~~~~~ kernel/resource.c:1654:8: note: in expansion of m...
2020 Jun 05
0
[PATCH v3 3/3] crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
...tio/virtio_crypto_algs.c:408:35: error: ???struct ablkcipher_request??? has no member named ???cryptlen??? drivers/crypto/virtio/virtio_crypto_algs.c:408:35: error: ???struct ablkcipher_request??? has no member named ???cryptlen??? ./include/linux/kernel.h:866:2: error: first argument to ???__builtin_choose_expr??? not a constant v4.19.125: Build failed! Errors: drivers/crypto/virtio/virtio_crypto_algs.c:422:35: error: ???struct ablkcipher_request??? has no member named ???cryptlen??? drivers/crypto/virtio/virtio_crypto_algs.c:422:35: error: ???struct ablkcipher_request??? has no member named ???c...
2020 Aug 04
1
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...of a couple of helper macros in a vain attempt to > + * help you keep your lunch down while reading it. > + */ It might help with the lunch, but it still gives a slight queasiness. No ideas for a better version, though. > +#define __virtio_pick_value(x, type, then, otherwise) \ > + __builtin_choose_expr(__same_type(x, type), then, otherwise) > + > +#define __virtio_pick_type(x, type, then, otherwise) \ > + __virtio_pick_value(x, type, (then)0, otherwise) > + > +#define __virtio_pick_endian(x, x16, x32, x64, otherwise) \ > + __virtio_pick_type(x, x16, __u16, \ > + __vi...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...> +#define __virtio_native_typeof(x) typeof(x) > + > +#else > + > +/* > + * We build this out of a couple of helper macros in a vain attempt to > + * help you keep your lunch down while reading it. > + */ > +#define __virtio_pick_value(x, type, then, otherwise) \ > + __builtin_choose_expr(__same_type(x, type), then, otherwise) > + > +#define __virtio_pick_type(x, type, then, otherwise) \ > + __virtio_pick_value(x, type, (then)0, otherwise) > + > +#define __virtio_pick_endian(x, x16, x32, x64, otherwise) \ > + __virtio_pick_type(x, x16, __u16, \ > + __vi...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...> +#define __virtio_native_typeof(x) typeof(x) > + > +#else > + > +/* > + * We build this out of a couple of helper macros in a vain attempt to > + * help you keep your lunch down while reading it. > + */ > +#define __virtio_pick_value(x, type, then, otherwise) \ > + __builtin_choose_expr(__same_type(x, type), then, otherwise) > + > +#define __virtio_pick_type(x, type, then, otherwise) \ > + __virtio_pick_value(x, type, (then)0, otherwise) > + > +#define __virtio_pick_endian(x, x16, x32, x64, otherwise) \ > + __virtio_pick_type(x, x16, __u16, \ > + __vi...
2020 Aug 03
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...+/* Not a checker - we can keep things simple */ +#define __virtio_native_typeof(x) typeof(x) + +#else + +/* + * We build this out of a couple of helper macros in a vain attempt to + * help you keep your lunch down while reading it. + */ +#define __virtio_pick_value(x, type, then, otherwise) \ + __builtin_choose_expr(__same_type(x, type), then, otherwise) + +#define __virtio_pick_type(x, type, then, otherwise) \ + __virtio_pick_value(x, type, (then)0, otherwise) + +#define __virtio_pick_endian(x, x16, x32, x64, otherwise) \ + __virtio_pick_type(x, x16, __u16, \ + __virtio_pick_type(x, x32, __u32, \...
2020 Aug 05
0
[PATCH v3 03/38] virtio: allow __virtioXX, __leXX in config space
...+/* Not a checker - we can keep things simple */ +#define __virtio_native_typeof(x) typeof(x) + +#else + +/* + * We build this out of a couple of helper macros in a vain attempt to + * help you keep your lunch down while reading it. + */ +#define __virtio_pick_value(x, type, then, otherwise) \ + __builtin_choose_expr(__same_type(x, type), then, otherwise) + +#define __virtio_pick_type(x, type, then, otherwise) \ + __virtio_pick_value(x, type, (then)0, otherwise) + +#define __virtio_pick_endian(x, x16, x32, x64, otherwise) \ + __virtio_pick_type(x, x16, __u16, \ + __virtio_pick_type(x, x32, __u32, \...
2020 Aug 05
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...f(x) > > + > > +#else > > + > > +/* > > + * We build this out of a couple of helper macros in a vain attempt to > > + * help you keep your lunch down while reading it. > > + */ > > +#define __virtio_pick_value(x, type, then, otherwise) \ > > + __builtin_choose_expr(__same_type(x, type), then, otherwise) > > + > > +#define __virtio_pick_type(x, type, then, otherwise) \ > > + __virtio_pick_value(x, type, (then)0, otherwise) > > + > > +#define __virtio_pick_endian(x, x16, x32, x64, otherwise) \ > > + __virtio_pick_type(x,...
2020 Aug 05
0
[PATCH v3 24/38] virtio_config: rewrite using _Generic
...-/* Not a checker - we can keep things simple */ -#define __virtio_native_typeof(x) typeof(x) - -#else - -/* - * We build this out of a couple of helper macros in a vain attempt to - * help you keep your lunch down while reading it. - */ -#define __virtio_pick_value(x, type, then, otherwise) \ - __builtin_choose_expr(__same_type(x, type), then, otherwise) - -#define __virtio_pick_type(x, type, then, otherwise) \ - __virtio_pick_value(x, type, (then)0, otherwise) - -#define __virtio_pick_endian(x, x16, x32, x64, otherwise) \ - __virtio_pick_type(x, x16, __u16, \ - __virtio_pick_type(x, x32, __u32, \...
2019 Dec 15
0
[vhost:linux-next 12/12] drivers/vhost/vhost.c:1968:11: note: in expansion of macro 'min'
...peof(y) *)1))) ^ include/linux/kernel.h:858:4: note: in expansion of macro '__typecheck' (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~ include/linux/kernel.h:868:24: note: in expansion of macro '__safe_cmp' __builtin_choose_expr(__safe_cmp(x, y), \ ^~~~~~~~~~ include/linux/kernel.h:877:19: note: in expansion of macro '__careful_cmp' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~ >> drivers/vhost/vhost.c:1968:11: note: in expansion of macro ...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are not tagged with the correct endian-ness so it's easy to make mistakes like instanciating config space in native endian-ness. The following patches adding sparse tagging are currently in my tree. Lightly tested. As a follow-up, I plan to add new APIs that handle modern config space in a more efficient way (bypassing the version check).
2013 Feb 22
3
[GIT PULL] x86/mm changes for v3.9-rc1
..._map_numa_kva() x86-32, mm: Remove reference to alloc_remap() Merge remote-tracking branch 'origin/x86/mm' into x86/mm2 x86, mm: Use a bitfield to mask nuisance get_user() warnings x86: Be consistent with data size in getuser.S x86, mm: Redesign get_user with a __builtin_choose_expr hack x86, doc: Clarify the use of asm("%edx") in uaccess.h x86, mm: Move reserving low memory later in initialization Merge branch 'x86/mm2' into x86/mm Ingo Molnar (1): x86/mm: Don't flush the TLB on #WP pmd fixups Jacob Shin (3): x86, mm: if k...
2013 Feb 22
3
[GIT PULL] x86/mm changes for v3.9-rc1
..._map_numa_kva() x86-32, mm: Remove reference to alloc_remap() Merge remote-tracking branch 'origin/x86/mm' into x86/mm2 x86, mm: Use a bitfield to mask nuisance get_user() warnings x86: Be consistent with data size in getuser.S x86, mm: Redesign get_user with a __builtin_choose_expr hack x86, doc: Clarify the use of asm("%edx") in uaccess.h x86, mm: Move reserving low memory later in initialization Merge branch 'x86/mm2' into x86/mm Ingo Molnar (1): x86/mm: Don't flush the TLB on #WP pmd fixups Jacob Shin (3): x86, mm: if k...
2013 Feb 22
3
[GIT PULL] x86/mm changes for v3.9-rc1
..._map_numa_kva() x86-32, mm: Remove reference to alloc_remap() Merge remote-tracking branch 'origin/x86/mm' into x86/mm2 x86, mm: Use a bitfield to mask nuisance get_user() warnings x86: Be consistent with data size in getuser.S x86, mm: Redesign get_user with a __builtin_choose_expr hack x86, doc: Clarify the use of asm("%edx") in uaccess.h x86, mm: Move reserving low memory later in initialization Merge branch 'x86/mm2' into x86/mm Ingo Molnar (1): x86/mm: Don't flush the TLB on #WP pmd fixups Jacob Shin (3): x86, mm: if k...