|
@@ -18,10 +18,12 @@
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
|
#ifdef CONFIG_SMP
|
|
extern int threads_per_core;
|
|
extern int threads_per_core;
|
|
|
|
+extern int threads_per_subcore;
|
|
extern int threads_shift;
|
|
extern int threads_shift;
|
|
extern cpumask_t threads_core_mask;
|
|
extern cpumask_t threads_core_mask;
|
|
#else
|
|
#else
|
|
#define threads_per_core 1
|
|
#define threads_per_core 1
|
|
|
|
+#define threads_per_subcore 1
|
|
#define threads_shift 0
|
|
#define threads_shift 0
|
|
#define threads_core_mask (CPU_MASK_CPU0)
|
|
#define threads_core_mask (CPU_MASK_CPU0)
|
|
#endif
|
|
#endif
|
|
@@ -74,6 +76,11 @@ static inline int cpu_thread_in_core(int cpu)
|
|
return cpu & (threads_per_core - 1);
|
|
return cpu & (threads_per_core - 1);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline int cpu_thread_in_subcore(int cpu)
|
|
|
|
+{
|
|
|
|
+ return cpu & (threads_per_subcore - 1);
|
|
|
|
+}
|
|
|
|
+
|
|
static inline int cpu_first_thread_sibling(int cpu)
|
|
static inline int cpu_first_thread_sibling(int cpu)
|
|
{
|
|
{
|
|
return cpu & ~(threads_per_core - 1);
|
|
return cpu & ~(threads_per_core - 1);
|