--- linux-2.6.2/kernel/sched.c 2004-02-04 16:37:14.000000000 +1100 +++ linux-2.6.2-ck1/kernel/sched.c 2004-02-04 16:51:28.970446040 +1100 @@ -209,6 +209,7 @@ struct runqueue { atomic_t *node_nr_running; int prev_node_load[MAX_NUMNODES]; #endif + unsigned long cpu; task_t *migration_thread; struct list_head migration_queue; @@ -222,6 +223,10 @@ static DEFINE_PER_CPU(struct runqueue, r #define task_rq(p) cpu_rq(task_cpu(p)) #define cpu_curr(cpu) (cpu_rq(cpu)->curr) +#define ht_active (cpu_has_ht && smp_num_siblings > 1) +#define ht_siblings(cpu1, cpu2) (ht_active && \ + cpu_sibling_map[(cpu1)] == (cpu2)) + /* * Default context-switch locking: */ @@ -2914,6 +2919,7 @@ void __init sched_init(void) prio_array_t *array; rq = cpu_rq(i); + rq->cpu = (unsigned long)(i); rq->active = rq->arrays; rq->expired = rq->arrays + 1; rq->best_expired_prio = MAX_PRIO;