diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-11-09 10:39:52 +0000 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-11-09 10:39:52 +0000 |
commit | e459ca0aec9a38f71e35c83d3dcb3cadb5033334 (patch) | |
tree | d66e23adf3d366d07d1d77f7f3fc3356808fa795 /tools/include/linux/bits.h | |
parent | 56686ac80b859c2049cc372f7837470aa71c98cf (diff) | |
parent | 9365f0de4303f82ed4c2db1c39d3de824b249d80 (diff) |
Merge commit '9365f0de4303f82ed4c2db1c39d3de824b249d80' into HEAD
Merge v6.12-rc6 via char-misc-next to get some fixes needed for next few
patches in IIO.
Diffstat (limited to 'tools/include/linux/bits.h')
-rw-r--r-- | tools/include/linux/bits.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/include/linux/bits.h b/tools/include/linux/bits.h index 0eb24d21aac2..60044b608817 100644 --- a/tools/include/linux/bits.h +++ b/tools/include/linux/bits.h @@ -36,4 +36,19 @@ #define GENMASK_ULL(h, l) \ (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l)) +#if !defined(__ASSEMBLY__) +/* + * Missing asm support + * + * __GENMASK_U128() depends on _BIT128() which would not work + * in the asm code, as it shifts an 'unsigned __init128' data + * type instead of direct representation of 128 bit constants + * such as long and unsigned long. The fundamental problem is + * that a 128 bit constant will get silently truncated by the + * gcc compiler. + */ +#define GENMASK_U128(h, l) \ + (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l)) +#endif + #endif /* __LINUX_BITS_H */ |