aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-16 01:33:21 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-16 01:33:21 -0400
commitc91925db4925ba0d145478f02c093369196936e9 (patch)
tree0e5da4211de3c18b65337c3094ec15994cf2534a /block/blk.h
parent977ddd6b2e63716cfefe669bbdb30ec0bcea1fe4 (diff)
parent3894335876a6257ac46e14845bd37ae6fb0f7c87 (diff)
Merge branch 'fix/hda' into topic/hda
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 6e7dc87141e4..d6b911ac002c 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -142,14 +142,18 @@ static inline int queue_congestion_off_threshold(struct request_queue *q)
142 142
143static inline int blk_cpu_to_group(int cpu) 143static inline int blk_cpu_to_group(int cpu)
144{ 144{
145 int group = NR_CPUS;
145#ifdef CONFIG_SCHED_MC 146#ifdef CONFIG_SCHED_MC
146 const struct cpumask *mask = cpu_coregroup_mask(cpu); 147 const struct cpumask *mask = cpu_coregroup_mask(cpu);
147 return cpumask_first(mask); 148 group = cpumask_first(mask);
148#elif defined(CONFIG_SCHED_SMT) 149#elif defined(CONFIG_SCHED_SMT)
149 return cpumask_first(topology_thread_cpumask(cpu)); 150 group = cpumask_first(topology_thread_cpumask(cpu));
150#else 151#else
151 return cpu; 152 return cpu;
152#endif 153#endif
154 if (likely(group < NR_CPUS))
155 return group;
156 return cpu;
153} 157}
154 158
155/* 159/*