[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-backports
Subject: [PATCH v3 3/3] backports: fix compilation error against v4.4 kernel
From: AceLan Kao <acelan.kao () canonical ! com>
Date: 2019-03-27 3:00:44
Message-ID: 20190327030044.28263-4-acelan.kao () canonical ! com
[Download RAW message or body]
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(-)
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
--
2.17.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic