aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2010-10-19 03:13:04 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-10-19 03:13:04 -0400
commitfa251f89903d73989e2f63e13d0eaed1e07ce0da (patch)
tree3f7fe779941e3b6d67754dd7c44a32f48ea47c74 /block/blk.h
parentdd3932eddf428571762596e17b65f5dc92ca361b (diff)
parentcd07202cc8262e1669edff0d97715f3dd9260917 (diff)
Merge branch 'v2.6.36-rc8' into for-2.6.37/barrier
Conflicts: block/blk-core.c drivers/block/loop.c mm/swapfile.c Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/block/blk.h b/block/blk.h
index a09c18b19116..faf94f2acb12 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -148,14 +148,18 @@ static inline int queue_congestion_off_threshold(struct request_queue *q)
148 148
149static inline int blk_cpu_to_group(int cpu) 149static inline int blk_cpu_to_group(int cpu)
150{ 150{
151 int group = NR_CPUS;
151#ifdef CONFIG_SCHED_MC 152#ifdef CONFIG_SCHED_MC
152 const struct cpumask *mask = cpu_coregroup_mask(cpu); 153 const struct cpumask *mask = cpu_coregroup_mask(cpu);
153 return cpumask_first(mask); 154 group = cpumask_first(mask);
154#elif defined(CONFIG_SCHED_SMT) 155#elif defined(CONFIG_SCHED_SMT)
155 return cpumask_first(topology_thread_cpumask(cpu)); 156 group = cpumask_first(topology_thread_cpumask(cpu));
156#else 157#else
157 return cpu; 158 return cpu;
158#endif 159#endif
160 if (likely(group < NR_CPUS))
161 return group;
162 return cpu;
159} 163}
160 164
161/* 165/*