Message ID | 20190327030044.28263-4-acelan.kao@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | backports: to make iwlwifi backported from v5.1-rc1 can be compiled | expand |
diff --git a/patches/lib-refcount.patch b/patches/lib-refcount.patch index 28106342..ae568f8d 100644 --- a/patches/lib-refcount.patch +++ b/patches/lib-refcount.patch @@ -2,11 +2,15 @@ diff --git a/compat/lib-refcount.c b/compat/lib-refcount.c index 5d0582a..8d108f9 100644 --- a/compat/lib-refcount.c +++ b/compat/lib-refcount.c -@@ -39,6 +39,7 @@ +@@ -42,6 +42,11 @@ #include <linux/refcount.h> #include <linux/spinlock.h> #include <linux/bug.h> +#include <linux/export.h> ++ ++#ifndef smp_acquire__after_ctrl_dep ++#define smp_acquire__after_ctrl_dep() smp_rmb() ++#endif /** * refcount_add_not_zero_checked - add a value to a refcount unless it is 0
Add the smp_acquire__after_ctrl_dep macro to compat/lib-refcount.c to fix the compilation error /tmp/tmp.Z85sMNyuzD/backports-5.1-rc1-test1/backports-5.1-rc1/compat/lib-refcount.c: In function 'backport_refcount_sub_and_test_checked': /tmp/tmp.Z85sMNyuzD/backports-5.1-rc1-test1/backports-5.1-rc1/compat/lib-refcount.c:198:3: error: implicit declaration of function 'smp_acquire__after_ctrl_dep' [-Werror=implicit-function-declaration] smp_acquire__after_ctrl_dep(); ^ Signed-off-by: AceLan Kao <acelan.kao@canonical.com> --- patches/lib-refcount.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)