[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-backports
Subject: [PATCH RFC v2 01/11] backports: igb fixes for linux-3.12
From: Stefan Assmann <sassmann () kpanic ! de>
Date: 2013-12-18 16:08:15
Message-ID: 1387382905-14274-2-git-send-email-sassmann () kpanic ! de
[Download RAW message or body]
- refactor u64_stats_sync.h a bit
- add u64_stats_init define
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
backport/backport-include/linux/u64_stats_sync.h | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/backport/backport-include/linux/u64_stats_sync.h \
b/backport/backport-include/linux/u64_stats_sync.h index f15116c..ce6b778 100644
--- a/backport/backport-include/linux/u64_stats_sync.h
+++ b/backport/backport-include/linux/u64_stats_sync.h
@@ -1,6 +1,17 @@
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+#ifndef __BACKPORT_LINUX_U64_STATS_SYNC_H
+#define __BACKPORT_LINUX_U64_STATS_SYNC_H
+
#include_next <linux/u64_stats_sync.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
+#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
+# define u64_stats_init(syncp) seqcount_init(syncp.seq)
#else
+# define u64_stats_init(syncp) do { } while (0)
+#endif
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)
#ifndef _LINUX_U64_STATS_SYNC_H
#define _LINUX_U64_STATS_SYNC_H
@@ -141,4 +152,5 @@ static inline bool u64_stats_fetch_retry_bh(const struct \
u64_stats_sync *syncp, }
#endif /* _LINUX_U64_STATS_SYNC_H */
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */
+#endif /* __BACKPORT_LINUX_U64_STATS_SYNC_H */
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic