Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24480
b: refs/heads/master
c: 0a94502
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Mar 28, 2006
1 parent fa67751 commit 0d27c4e
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 631d6747e1d877a4baa924cb373b8b9511a53e5e
refs/heads/master: 0a945022778f100115d0cb6234eb28fc1b15ccaf
2 changes: 1 addition & 1 deletion trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3514,7 +3514,7 @@ int __init blk_dev_init(void)
iocontext_cachep = kmem_cache_create("blkdev_ioc",
sizeof(struct io_context), 0, SLAB_PANIC, NULL, NULL);

for_each_cpu(i)
for_each_possible_cpu(i)
INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i));

open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,6 @@ static void __devinit fdtable_defer_list_init(int cpu)
void __init files_defer_init(void)
{
int i;
for_each_cpu(i)
for_each_possible_cpu(i)
fdtable_defer_list_init(i);
}
2 changes: 1 addition & 1 deletion trunk/fs/proc/proc_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static int show_stat(struct seq_file *p, void *v)
if (wall_to_monotonic.tv_nsec)
--jif;

for_each_cpu(i) {
for_each_possible_cpu(i) {
int j;

user = cputime64_add(user, kstat_cpu(i).cpustat.user);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-generic/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
#define percpu_modcopy(pcpudst, src, size) \
do { \
unsigned int __i; \
for_each_cpu(__i) \
for_each_possible_cpu(__i) \
memcpy((pcpudst)+__per_cpu_offset[__i], \
(src), (size)); \
} while (0)
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/genhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ struct disk_attribute {
({ \
typeof(gendiskp->dkstats->field) res = 0; \
int i; \
for_each_cpu(i) \
for_each_possible_cpu(i) \
res += per_cpu_ptr(gendiskp->dkstats, i)->field; \
res; \
})

static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) {
int i;
for_each_cpu(i)
for_each_possible_cpu(i)
memset(per_cpu_ptr(gendiskp->dkstats, i), value,
sizeof (struct disk_stats));
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/kernel_stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static inline int kstat_irqs(int irq)
{
int cpu, sum = 0;

for_each_cpu(cpu)
for_each_possible_cpu(cpu)
sum += kstat_cpu(cpu).irqs[irq];

return sum;
Expand Down
2 changes: 1 addition & 1 deletion trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ static void __init setup_per_cpu_areas(void)
#endif
ptr = alloc_bootmem(size * nr_possible_cpus);

for_each_cpu(i) {
for_each_possible_cpu(i) {
__per_cpu_offset[i] = ptr - __per_cpu_start;
memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
ptr += size;
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ rcu_torture_printk(char *page)
long pipesummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 };
long batchsummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 };

for_each_cpu(cpu) {
for_each_possible_cpu(cpu) {
for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
pipesummary[i] += per_cpu(rcu_torture_count, cpu)[i];
batchsummary[i] += per_cpu(rcu_torture_batch, cpu)[i];
Expand Down Expand Up @@ -535,7 +535,7 @@ rcu_torture_init(void)
atomic_set(&n_rcu_torture_error, 0);
for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++)
atomic_set(&rcu_torture_wcount[i], 0);
for_each_cpu(cpu) {
for_each_possible_cpu(cpu) {
for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
per_cpu(rcu_torture_count, cpu)[i] = 0;
per_cpu(rcu_torture_batch, cpu)[i] = 0;
Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ unsigned long nr_uninterruptible(void)
{
unsigned long i, sum = 0;

for_each_cpu(i)
for_each_possible_cpu(i)
sum += cpu_rq(i)->nr_uninterruptible;

/*
Expand All @@ -1642,7 +1642,7 @@ unsigned long long nr_context_switches(void)
{
unsigned long long i, sum = 0;

for_each_cpu(i)
for_each_possible_cpu(i)
sum += cpu_rq(i)->nr_switches;

return sum;
Expand All @@ -1652,7 +1652,7 @@ unsigned long nr_iowait(void)
{
unsigned long i, sum = 0;

for_each_cpu(i)
for_each_possible_cpu(i)
sum += atomic_read(&cpu_rq(i)->nr_iowait);

return sum;
Expand Down Expand Up @@ -6080,7 +6080,7 @@ void __init sched_init(void)
runqueue_t *rq;
int i, j, k;

for_each_cpu(i) {
for_each_possible_cpu(i) {
prio_array_t *array;

rq = cpu_rq(i);
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -3311,7 +3311,7 @@ void *__alloc_percpu(size_t size)
* and we have no way of figuring out how to fix the array
* that we have allocated then....
*/
for_each_cpu(i) {
for_each_possible_cpu(i) {
int node = cpu_to_node(i);

if (node_online(node))
Expand Down Expand Up @@ -3398,7 +3398,7 @@ void free_percpu(const void *objp)
/*
* We allocate for all cpus so we cannot use for online cpu here.
*/
for_each_cpu(i)
for_each_possible_cpu(i)
kfree(p->ptrs[i]);
kfree(p);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ long percpu_counter_sum(struct percpu_counter *fbc)

spin_lock(&fbc->lock);
ret = fbc->count;
for_each_cpu(cpu) {
for_each_possible_cpu(cpu) {
long *pcount = per_cpu_ptr(fbc->counters, cpu);
ret += *pcount;
}
Expand Down

0 comments on commit 0d27c4e

Please sign in to comment.