diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 3 | ||||
| -rw-r--r-- | lib/checksum.c | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 5f2ce616c046..a2ca213c71ca 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -1215,6 +1215,7 @@ config RCU_TORTURE_TEST | |||
| 1215 | tristate "torture tests for RCU" | 1215 | tristate "torture tests for RCU" |
| 1216 | depends on DEBUG_KERNEL | 1216 | depends on DEBUG_KERNEL |
| 1217 | select TORTURE_TEST | 1217 | select TORTURE_TEST |
| 1218 | select SRCU | ||
| 1218 | default n | 1219 | default n |
| 1219 | help | 1220 | help |
| 1220 | This option provides a kernel module that runs torture tests | 1221 | This option provides a kernel module that runs torture tests |
| @@ -1257,7 +1258,7 @@ config RCU_CPU_STALL_TIMEOUT | |||
| 1257 | config RCU_CPU_STALL_INFO | 1258 | config RCU_CPU_STALL_INFO |
| 1258 | bool "Print additional diagnostics on RCU CPU stall" | 1259 | bool "Print additional diagnostics on RCU CPU stall" |
| 1259 | depends on (TREE_RCU || PREEMPT_RCU) && DEBUG_KERNEL | 1260 | depends on (TREE_RCU || PREEMPT_RCU) && DEBUG_KERNEL |
| 1260 | default n | 1261 | default y |
| 1261 | help | 1262 | help |
| 1262 | For each stalled CPU that is aware of the current RCU grace | 1263 | For each stalled CPU that is aware of the current RCU grace |
| 1263 | period, print out additional per-CPU diagnostic information | 1264 | period, print out additional per-CPU diagnostic information |
diff --git a/lib/checksum.c b/lib/checksum.c index 129775eb6de6..8b39e86dbab5 100644 --- a/lib/checksum.c +++ b/lib/checksum.c | |||
| @@ -181,6 +181,15 @@ csum_partial_copy(const void *src, void *dst, int len, __wsum sum) | |||
| 181 | EXPORT_SYMBOL(csum_partial_copy); | 181 | EXPORT_SYMBOL(csum_partial_copy); |
| 182 | 182 | ||
| 183 | #ifndef csum_tcpudp_nofold | 183 | #ifndef csum_tcpudp_nofold |
| 184 | static inline u32 from64to32(u64 x) | ||
| 185 | { | ||
| 186 | /* add up 32-bit and 32-bit for 32+c bit */ | ||
| 187 | x = (x & 0xffffffff) + (x >> 32); | ||
| 188 | /* add up carry.. */ | ||
| 189 | x = (x & 0xffffffff) + (x >> 32); | ||
| 190 | return (u32)x; | ||
| 191 | } | ||
| 192 | |||
| 184 | __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, | 193 | __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, |
| 185 | unsigned short len, | 194 | unsigned short len, |
| 186 | unsigned short proto, | 195 | unsigned short proto, |
| @@ -195,8 +204,7 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, | |||
| 195 | #else | 204 | #else |
| 196 | s += (proto + len) << 8; | 205 | s += (proto + len) << 8; |
| 197 | #endif | 206 | #endif |
| 198 | s += (s >> 32); | 207 | return (__force __wsum)from64to32(s); |
| 199 | return (__force __wsum)s; | ||
| 200 | } | 208 | } |
| 201 | EXPORT_SYMBOL(csum_tcpudp_nofold); | 209 | EXPORT_SYMBOL(csum_tcpudp_nofold); |
| 202 | #endif | 210 | #endif |
