summaryrefslogtreecommitdiff
path: root/include/linux/compiler_attributes.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-10-20 09:09:00 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-10-20 09:09:00 +0200
commit1aca5ce036e3499336d1a2ace3070f908381c055 (patch)
tree32b53fca3cff8c6c084d9c1d94d1761c3618e739 /include/linux/compiler_attributes.h
parent01f2cf53844b01e691516b465df1b6ab01b03230 (diff)
parent9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff)
Merge drm/drm-fixes into drm-misc-fixes
Backmerging to get v6.1-rc1. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'include/linux/compiler_attributes.h')
-rw-r--r--include/linux/compiler_attributes.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
index 445e80517cab..898b3458b24a 100644
--- a/include/linux/compiler_attributes.h
+++ b/include/linux/compiler_attributes.h
@@ -35,7 +35,8 @@
/*
* Note: do not use this directly. Instead, use __alloc_size() since it is conditionally
- * available and includes other attributes.
+ * available and includes other attributes. For GCC < 9.1, __alloc_size__ gets undefined
+ * in compiler-gcc.h, due to misbehaviors.
*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute
* clang: https://clang.llvm.org/docs/AttributeReference.html#alloc-size
@@ -371,4 +372,11 @@
*/
#define __weak __attribute__((__weak__))
+/*
+ * Used by functions that use '__builtin_return_address'. These function
+ * don't want to be splited or made inline, which can make
+ * the '__builtin_return_address' get unexpected address.
+ */
+#define __fix_address noinline __noclone
+
#endif /* __LINUX_COMPILER_ATTRIBUTES_H */