lkml.org 
[lkml]   [2007]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 19/30] cpu alloc: tcp statistics
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
net/ipv4/tcp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6/net/ipv4/tcp.c
===================================================================
--- linux-2.6.orig/net/ipv4/tcp.c 2007-11-15 21:17:24.267654551 -0800
+++ linux-2.6/net/ipv4/tcp.c 2007-11-15 21:25:34.214404334 -0800
@@ -2273,7 +2273,7 @@ static void __tcp_free_md5sig_pool(struc
{
int cpu;
for_each_possible_cpu(cpu) {
- struct tcp_md5sig_pool *p = *per_cpu_ptr(pool, cpu);
+ struct tcp_md5sig_pool *p = *CPU_PTR(pool, cpu);
if (p) {
if (p->md5_desc.tfm)
crypto_free_hash(p->md5_desc.tfm);
@@ -2281,7 +2281,7 @@ static void __tcp_free_md5sig_pool(struc
p = NULL;
}
}
- free_percpu(pool);
+ CPU_FREE(pool);
}

void tcp_free_md5sig_pool(void)
@@ -2305,7 +2305,7 @@ static struct tcp_md5sig_pool **__tcp_al
int cpu;
struct tcp_md5sig_pool **pool;

- pool = alloc_percpu(struct tcp_md5sig_pool *);
+ pool = CPU_ALLOC(struct tcp_md5sig_pool *, GFP_KERNEL);
if (!pool)
return NULL;

@@ -2316,7 +2316,7 @@ static struct tcp_md5sig_pool **__tcp_al
p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p)
goto out_free;
- *per_cpu_ptr(pool, cpu) = p;
+ *CPU_PTR(pool, cpu) = p;

hash = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC);
if (!hash || IS_ERR(hash))
@@ -2381,7 +2381,7 @@ struct tcp_md5sig_pool *__tcp_get_md5sig
if (p)
tcp_md5sig_users++;
spin_unlock_bh(&tcp_md5sig_pool_lock);
- return (p ? *per_cpu_ptr(p, cpu) : NULL);
+ return (p ? *CPU_PTR(p, cpu) : NULL);
}

EXPORT_SYMBOL(__tcp_get_md5sig_pool);
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-17 00:23    [W:0.117 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site