提交 17f3ae08 编写于 作者: A Andrew Morton 提交者: David S. Miller

[I/OAT]: Do not use for_each_cpu().

for_each_cpu() is going away (and is gone in -mm).
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NChris Leech <christopher.leech@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1a2449a8
...@@ -79,7 +79,7 @@ static ssize_t show_memcpy_count(struct class_device *cd, char *buf) ...@@ -79,7 +79,7 @@ static ssize_t show_memcpy_count(struct class_device *cd, char *buf)
unsigned long count = 0; unsigned long count = 0;
int i; int i;
for_each_cpu(i) for_each_possible_cpu(i)
count += per_cpu_ptr(chan->local, i)->memcpy_count; count += per_cpu_ptr(chan->local, i)->memcpy_count;
return sprintf(buf, "%lu\n", count); return sprintf(buf, "%lu\n", count);
...@@ -91,7 +91,7 @@ static ssize_t show_bytes_transferred(struct class_device *cd, char *buf) ...@@ -91,7 +91,7 @@ static ssize_t show_bytes_transferred(struct class_device *cd, char *buf)
unsigned long count = 0; unsigned long count = 0;
int i; int i;
for_each_cpu(i) for_each_possible_cpu(i)
count += per_cpu_ptr(chan->local, i)->bytes_transferred; count += per_cpu_ptr(chan->local, i)->bytes_transferred;
return sprintf(buf, "%lu\n", count); return sprintf(buf, "%lu\n", count);
...@@ -182,7 +182,7 @@ static void dma_chan_free_rcu(struct rcu_head *rcu) ...@@ -182,7 +182,7 @@ static void dma_chan_free_rcu(struct rcu_head *rcu)
struct dma_chan *chan = container_of(rcu, struct dma_chan, rcu); struct dma_chan *chan = container_of(rcu, struct dma_chan, rcu);
int bias = 0x7FFFFFFF; int bias = 0x7FFFFFFF;
int i; int i;
for_each_cpu(i) for_each_possible_cpu(i)
bias -= local_read(&per_cpu_ptr(chan->local, i)->refcount); bias -= local_read(&per_cpu_ptr(chan->local, i)->refcount);
atomic_sub(bias, &chan->refcount.refcount); atomic_sub(bias, &chan->refcount.refcount);
kref_put(&chan->refcount, dma_chan_cleanup); kref_put(&chan->refcount, dma_chan_cleanup);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册