diff options
author | Christoph Lameter <cl@linux.com> | 2014-08-17 13:30:35 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-08-26 13:45:47 -0400 |
commit | 903ceff7ca7b4d80c083a80ee5163b74e9fa359f (patch) | |
tree | 60c82f70f9d58720042bb3249eb6fa9f89fe9025 /net/ipv4 | |
parent | f7f66b05aa2ac2632c5441a3f129f3be827fe7e7 (diff) |
net: Replace get_cpu_var through this_cpu_ptr
Replace uses of get_cpu_var for address calculation through this_cpu_ptr.
Cc: netdev@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/route.c | 4 | ||||
-rw-r--r-- | net/ipv4/syncookies.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index eaa4b000c7b4..7d6f4e021846 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1311,7 +1311,7 @@ static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt) | |||
1311 | if (rt_is_input_route(rt)) { | 1311 | if (rt_is_input_route(rt)) { |
1312 | p = (struct rtable **)&nh->nh_rth_input; | 1312 | p = (struct rtable **)&nh->nh_rth_input; |
1313 | } else { | 1313 | } else { |
1314 | p = (struct rtable **)__this_cpu_ptr(nh->nh_pcpu_rth_output); | 1314 | p = (struct rtable **)raw_cpu_ptr(nh->nh_pcpu_rth_output); |
1315 | } | 1315 | } |
1316 | orig = *p; | 1316 | orig = *p; |
1317 | 1317 | ||
@@ -1939,7 +1939,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
1939 | do_cache = false; | 1939 | do_cache = false; |
1940 | goto add; | 1940 | goto add; |
1941 | } | 1941 | } |
1942 | prth = __this_cpu_ptr(nh->nh_pcpu_rth_output); | 1942 | prth = raw_cpu_ptr(nh->nh_pcpu_rth_output); |
1943 | } | 1943 | } |
1944 | rth = rcu_dereference(*prth); | 1944 | rth = rcu_dereference(*prth); |
1945 | if (rt_cache_valid(rth)) { | 1945 | if (rt_cache_valid(rth)) { |
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index c0c75688896e..f83391bfdd76 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -40,7 +40,7 @@ static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, | |||
40 | 40 | ||
41 | net_get_random_once(syncookie_secret, sizeof(syncookie_secret)); | 41 | net_get_random_once(syncookie_secret, sizeof(syncookie_secret)); |
42 | 42 | ||
43 | tmp = __get_cpu_var(ipv4_cookie_scratch); | 43 | tmp = this_cpu_ptr(ipv4_cookie_scratch); |
44 | memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c])); | 44 | memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c])); |
45 | tmp[0] = (__force u32)saddr; | 45 | tmp[0] = (__force u32)saddr; |
46 | tmp[1] = (__force u32)daddr; | 46 | tmp[1] = (__force u32)daddr; |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 541f26a67ba2..b2cab7770a11 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -3058,7 +3058,7 @@ struct tcp_md5sig_pool *tcp_get_md5sig_pool(void) | |||
3058 | local_bh_disable(); | 3058 | local_bh_disable(); |
3059 | p = ACCESS_ONCE(tcp_md5sig_pool); | 3059 | p = ACCESS_ONCE(tcp_md5sig_pool); |
3060 | if (p) | 3060 | if (p) |
3061 | return __this_cpu_ptr(p); | 3061 | return raw_cpu_ptr(p); |
3062 | 3062 | ||
3063 | local_bh_enable(); | 3063 | local_bh_enable(); |
3064 | return NULL; | 3064 | return NULL; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 5a7c41fbc6d3..d145f7ef78f3 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -842,7 +842,7 @@ void tcp_wfree(struct sk_buff *skb) | |||
842 | 842 | ||
843 | /* queue this socket to tasklet queue */ | 843 | /* queue this socket to tasklet queue */ |
844 | local_irq_save(flags); | 844 | local_irq_save(flags); |
845 | tsq = &__get_cpu_var(tsq_tasklet); | 845 | tsq = this_cpu_ptr(&tsq_tasklet); |
846 | list_add(&tp->tsq_node, &tsq->head); | 846 | list_add(&tp->tsq_node, &tsq->head); |
847 | tasklet_schedule(&tsq->tasklet); | 847 | tasklet_schedule(&tsq->tasklet); |
848 | local_irq_restore(flags); | 848 | local_irq_restore(flags); |