aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h
index c79f30e1df52..de74254cb916 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -59,4 +59,16 @@ static inline int queue_congestion_off_threshold(struct request_queue *q)
59 59
60#endif /* BLK_DEV_INTEGRITY */ 60#endif /* BLK_DEV_INTEGRITY */
61 61
62static inline int blk_cpu_to_group(int cpu)
63{
64#ifdef CONFIG_SCHED_MC
65 cpumask_t mask = cpu_coregroup_map(cpu);
66 return first_cpu(mask);
67#elif defined(CONFIG_SCHED_SMT)
68 return first_cpu(per_cpu(cpu_sibling_map, cpu));
69#else
70 return cpu;
71#endif
72}
73
62#endif 74#endif