imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,46 +1,46 @@
 int cpupri_find(struct cpupri *cp, struct task_struct *p, struct cpumask *lowest_mask) {
   int idx = 0;
   int task_pri = convert_prio(p->prio);
   BUG_ON(task_pri >= CPUPRI_NR_PRIORITIES);
   for (idx = 0; idx < task_pri; idx++) {
     struct cpupri_vec *vec = &cp->pri_to_cpu[idx];
     int skip = 0;
     if (!atomic_read(&(vec)->count)) skip = 1;
     /*
      * When looking at the vector, we need to read the counter,
      * do a memory barrier, then read the mask.
      *
      * Note: This is still all racey, but we can deal with it.
      *  Ideally, we only want to look at masks that are set.
      *
      *  If a mask is not set, then the only thing wrong is that we
      *  did a little more work than necessary.
      *
      *  If we read a zero count but the mask is set, because of the
      *  memory barriers, that can only happen when the highest prio
      *  task for a run queue has left the run queue, in which case,
      *  it will be followed by a pull. If the task we are processing
      *  fails to find a proper place to go, that pull request will
      *  pull this task if the run queue is running at a lower
      *  priority.
      */
     smp_rmb();
     /* Need to do the rmb for every iteration */
     if (skip) continue;
-    if (cpumask_any_and(tsk_cpus_allowed(p), vec->mask) >= nr_cpu_ids) continue;
+    if (cpumask_any_and(&p->cpus_allowed, vec->mask) >= nr_cpu_ids) continue;
     if (lowest_mask) {
-      cpumask_and(lowest_mask, tsk_cpus_allowed(p), vec->mask);
+      cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask);
       /*
        * We have to ensure that we have at least one bit
        * still set in the array, since the map could have
        * been concurrently emptied between the first and
        * second reads of vec->mask.  If we hit this
        * condition, simply act as though we never hit this
        * priority level and continue on.
        */
       if (cpumask_any(lowest_mask) >= nr_cpu_ids) continue;
     }
     return 1;
   }
   return 0;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,30 +1,30 @@
 static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p) {
   struct rq *later_rq = NULL;
   later_rq = find_lock_later_rq(p, rq);
   if (!later_rq) {
     int cpu;
     /*
      * If we cannot preempt any rq, fall back to pick any
      * online cpu.
      */
-    cpu = cpumask_any_and(cpu_active_mask, tsk_cpus_allowed(p));
+    cpu = cpumask_any_and(cpu_active_mask, &p->cpus_allowed);
     if (cpu >= nr_cpu_ids) {
       /*
        * Fail to find any suitable cpu.
        * The task will never come back!
        */
       BUG_ON(dl_bandwidth_enabled());
       /*
        * If admission control is disabled we
        * try a little harder to let the task
        * run.
        */
       cpu = cpumask_any(cpu_active_mask);
     }
     later_rq = cpu_rq(cpu);
     double_lock_balance(rq, later_rq);
   }
   set_task_cpu(p, later_rq->cpu);
   double_unlock_balance(later_rq, rq);
   return later_rq;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,37 +1,37 @@
 static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq) {
   struct rq *later_rq = NULL;
   int tries;
   int cpu;
   for (tries = 0; tries < DL_MAX_TRIES; tries++) {
     cpu = find_later_rq(task);
     if ((cpu == -1) || (cpu == rq->cpu)) break;
     later_rq = cpu_rq(cpu);
     if (later_rq->dl.dl_nr_running && !dl_time_before(task->dl.deadline, later_rq->dl.earliest_dl.curr)) {
       /*
        * Target rq has tasks of equal or earlier deadline,
        * retrying does not release any lock and is unlikely
        * to yield a different result.
        */
       later_rq = NULL;
       break;
     }
     /* Retry if something changed. */
     if (double_lock_balance(rq, later_rq)) {
-      if (unlikely(task_rq(task) != rq || !cpumask_test_cpu(later_rq->cpu, tsk_cpus_allowed(task)) || task_running(rq, task) || !dl_task(task) || !task_on_rq_queued(task))) {
+      if (unlikely(task_rq(task) != rq || !cpumask_test_cpu(later_rq->cpu, &task->cpus_allowed) || task_running(rq, task) || !dl_task(task) || !task_on_rq_queued(task))) {
         double_unlock_balance(rq, later_rq);
         later_rq = NULL;
         break;
       }
     }
     /*
      * If the rq we found has no -deadline task, or
      * its earliest one has a later deadline than our
      * task, the rq is a good one.
      */
     if (!later_rq->dl.dl_nr_running || dl_time_before(task->dl.deadline, later_rq->dl.earliest_dl.curr)) break;
     /* Otherwise we try again. */
     double_unlock_balance(rq, later_rq);
     later_rq = NULL;
   }
   return later_rq;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,4 +1,4 @@
 static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu) {
-  if (!task_running(rq, p) && cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) return 1;
+  if (!task_running(rq, p) && cpumask_test_cpu(cpu, &p->cpus_allowed)) return 1;
   return 0;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,58 +1,58 @@
 static int can_migrate_task(struct task_struct *p, struct lb_env *env) {
   int tsk_cache_hot;
   lockdep_assert_held(&env->src_rq->lock);
   /*
    * We do not migrate tasks that are:
    * 1) throttled_lb_pair, or
    * 2) cannot be migrated to this CPU due to cpus_allowed, or
    * 3) running (obviously), or
    * 4) are cache-hot on their current CPU.
    */
   if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu)) return 0;
-  if (!cpumask_test_cpu(env->dst_cpu, tsk_cpus_allowed(p))) {
+  if (!cpumask_test_cpu(env->dst_cpu, &p->cpus_allowed)) {
     int cpu;
     schedstat_inc(p->se.statistics.nr_failed_migrations_affine);
     env->flags |= LBF_SOME_PINNED;
     /*
      * Remember if this task can be migrated to any other cpu in
      * our sched_group. We may want to revisit it if we couldn't
      * meet load balance goals by pulling other tasks on src_cpu.
      *
      * Also avoid computing new_dst_cpu if we have already computed
      * one in current iteration.
      */
     if (!env->dst_grpmask || (env->flags & LBF_DST_PINNED)) return 0;
     /* Prevent to re-select dst_cpu via env's cpus */
     for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) {
-      if (cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) {
+      if (cpumask_test_cpu(cpu, &p->cpus_allowed)) {
         env->flags |= LBF_DST_PINNED;
         env->new_dst_cpu = cpu;
         break;
       }
     }
     return 0;
   }
   /* Record that we found atleast one task that could run on dst_cpu */
   env->flags &= ~LBF_ALL_PINNED;
   if (task_running(env->src_rq, p)) {
     schedstat_inc(p->se.statistics.nr_failed_migrations_running);
     return 0;
   }
   /*
    * Aggressive migration if:
    * 1) destination numa is preferred
    * 2) task is cache cold, or
    * 3) too many balance attempts have failed.
    */
   tsk_cache_hot = migrate_degrades_locality(p, env);
   if (tsk_cache_hot == -1) tsk_cache_hot = task_hot(p, env);
   if (tsk_cache_hot <= 0 || env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
     if (tsk_cache_hot == 1) {
       schedstat_inc(env->sd->lb_hot_gained[env->idle]);
       schedstat_inc(p->se.statistics.nr_forced_migrations);
     }
     return 1;
   }
   schedstat_inc(p->se.statistics.nr_failed_migrations_hot);
   return 0;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,42 +1,42 @@
 static int find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu) {
   unsigned long load, min_load = ULONG_MAX;
   unsigned int min_exit_latency = UINT_MAX;
   u64 latest_idle_timestamp = 0;
   int least_loaded_cpu = this_cpu;
   int shallowest_idle_cpu = -1;
   int i;
   /* Check if we have any choice: */
   if (group->group_weight == 1) return cpumask_first(sched_group_cpus(group));
   /* Traverse only the allowed CPUs */
-  for_each_cpu_and(i, sched_group_cpus(group), tsk_cpus_allowed(p)) {
+  for_each_cpu_and(i, sched_group_cpus(group), &p->cpus_allowed) {
     if (idle_cpu(i)) {
       struct rq *rq = cpu_rq(i);
       struct cpuidle_state *idle = idle_get_state(rq);
       if (idle && idle->exit_latency < min_exit_latency) {
         /*
          * We give priority to a CPU whose idle state
          * has the smallest exit latency irrespective
          * of any idle timestamp.
          */
         min_exit_latency = idle->exit_latency;
         latest_idle_timestamp = rq->idle_stamp;
         shallowest_idle_cpu = i;
       } else if ((!idle || idle->exit_latency == min_exit_latency) && rq->idle_stamp > latest_idle_timestamp) {
         /*
          * If equal or no active idle state, then
          * the most recently idled CPU might have
          * a warmer cache.
          */
         latest_idle_timestamp = rq->idle_stamp;
         shallowest_idle_cpu = i;
       }
     } else if (shallowest_idle_cpu == -1) {
       load = weighted_cpuload(i);
       if (load < min_load || (load == min_load && i == this_cpu)) {
         min_load = load;
         least_loaded_cpu = i;
       }
     }
   }
   return shallowest_idle_cpu != -1 ? shallowest_idle_cpu : least_loaded_cpu;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,25 +1,25 @@
 static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target) {
   struct sched_domain *this_sd;
   u64 avg_cost, avg_idle = this_rq()->avg_idle;
   u64 time, cost;
   s64 delta;
   int cpu, wrap;
   this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc));
   if (!this_sd) return -1;
   avg_cost = this_sd->avg_scan_cost;
   /*
    * Due to large variance we need a large fuzz factor; hackbench in
    * particularly is sensitive here.
    */
   if ((avg_idle / 512) < avg_cost) return -1;
   time = local_clock();
   for_each_cpu_wrap(cpu, sched_domain_span(sd), target, wrap) {
-    if (!cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) continue;
+    if (!cpumask_test_cpu(cpu, &p->cpus_allowed)) continue;
     if (idle_cpu(cpu)) break;
   }
   time = local_clock() - time;
   cost = this_sd->avg_scan_cost;
   delta = (s64)(time - cost) / 8;
   this_sd->avg_scan_cost += delta;
   return cpu;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,65 +1,65 @@
 static int select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags) {
   struct sched_domain *tmp, *affine_sd = NULL, *sd = NULL;
   int cpu = smp_processor_id();
   int new_cpu = prev_cpu;
   int want_affine = 0;
   int sync = wake_flags & WF_SYNC;
   if (sd_flag & SD_BALANCE_WAKE) {
     record_wakee(p);
-    want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) && cpumask_test_cpu(cpu, tsk_cpus_allowed(p));
+    want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) && cpumask_test_cpu(cpu, &p->cpus_allowed);
   }
   rcu_read_lock();
   for_each_domain(cpu, tmp) {
     if (!(tmp->flags & SD_LOAD_BALANCE)) break;
     /*
      * If both cpu and prev_cpu are part of this domain,
      * cpu is a valid SD_WAKE_AFFINE target.
      */
     if (want_affine && (tmp->flags & SD_WAKE_AFFINE) && cpumask_test_cpu(prev_cpu, sched_domain_span(tmp))) {
       affine_sd = tmp;
       break;
     }
     if (tmp->flags & sd_flag)
       sd = tmp;
     else if (!want_affine)
       break;
   }
   if (affine_sd) {
     sd = NULL; /* Prefer wake_affine over balance flags */
     if (cpu != prev_cpu && wake_affine(affine_sd, p, prev_cpu, sync)) new_cpu = cpu;
   }
   if (!sd) {
     if (sd_flag & SD_BALANCE_WAKE) /* XXX always ? */
       new_cpu = select_idle_sibling(p, prev_cpu, new_cpu);
   } else
     while (sd) {
       struct sched_group *group;
       int weight;
       if (!(sd->flags & sd_flag)) {
         sd = sd->child;
         continue;
       }
       group = find_idlest_group(sd, p, cpu, sd_flag);
       if (!group) {
         sd = sd->child;
         continue;
       }
       new_cpu = find_idlest_cpu(group, p, cpu);
       if (new_cpu == -1 || new_cpu == cpu) {
         /* Now try balancing at a lower domain level of cpu */
         sd = sd->child;
         continue;
       }
       /* Now try balancing at a lower domain level of new_cpu */
       cpu = new_cpu;
       weight = sd->span_weight;
       sd = NULL;
       for_each_domain(cpu, tmp) {
         if (weight <= tmp->span_weight) break;
         if (tmp->flags & sd_flag) sd = tmp;
       }
       /* while loop will break here if sd == NULL */
     }
   rcu_read_unlock();
   return new_cpu;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void task_numa_find_cpu(struct task_numa_env *env, long taskimp, long groupimp) {
   int cpu;
   for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) {
     /* Skip this CPU if the source task cannot migrate */
-    if (!cpumask_test_cpu(cpu, tsk_cpus_allowed(env->p))) continue;
+    if (!cpumask_test_cpu(cpu, &env->p->cpus_allowed)) continue;
     env->dst_cpu = cpu;
     task_numa_compare(env, taskimp, groupimp);
   }
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,39 +1,39 @@
 static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) {
   struct rq *lowest_rq = NULL;
   int tries;
   int cpu;
   for (tries = 0; tries < RT_MAX_TRIES; tries++) {
     cpu = find_lowest_rq(task);
     if ((cpu == -1) || (cpu == rq->cpu)) break;
     lowest_rq = cpu_rq(cpu);
     if (lowest_rq->rt.highest_prio.curr <= task->prio) {
       /*
        * Target rq has tasks of equal or higher priority,
        * retrying does not release any lock and is unlikely
        * to yield a different result.
        */
       lowest_rq = NULL;
       break;
     }
     /* if the prio of this runqueue changed, try again */
     if (double_lock_balance(rq, lowest_rq)) {
       /*
        * We had to unlock the run queue. In
        * the mean time, task could have
        * migrated already or had its affinity changed.
        * Also make sure that it wasn't scheduled on its rq.
        */
-      if (unlikely(task_rq(task) != rq || !cpumask_test_cpu(lowest_rq->cpu, tsk_cpus_allowed(task)) || task_running(rq, task) || !rt_task(task) || !task_on_rq_queued(task))) {
+      if (unlikely(task_rq(task) != rq || !cpumask_test_cpu(lowest_rq->cpu, &task->cpus_allowed) || task_running(rq, task) || !rt_task(task) || !task_on_rq_queued(task))) {
         double_unlock_balance(rq, lowest_rq);
         lowest_rq = NULL;
         break;
       }
     }
     /* If this rq is still suitable use it. */
     if (lowest_rq->rt.highest_prio.curr > task->prio) break;
     /* try again */
     double_unlock_balance(rq, lowest_rq);
     lowest_rq = NULL;
   }
   return lowest_rq;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,4 +1,4 @@
 static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) {
-  if (!task_running(rq, p) && cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) return 1;
+  if (!task_running(rq, p) && cpumask_test_cpu(cpu, &p->cpus_allowed)) return 1;
   return 0;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,35 +1,35 @@
 void __spu_update_sched_info(struct spu_context *ctx) {
   /*
    * assert that the context is not on the runqueue, so it is safe
    * to change its scheduling parameters.
    */
   BUG_ON(!list_empty(&ctx->rq));
   /*
    * 32-Bit assignments are atomic on powerpc, and we don't care about
    * memory ordering here because retrieving the controlling thread is
    * per definition racy.
    */
   ctx->tid = current->pid;
   /*
    * We do our own priority calculations, so we normally want
    * ->static_prio to start with. Unfortunately this field
    * contains junk for threads with a realtime scheduling
    * policy so we have to look at ->prio in this case.
    */
   if (rt_prio(current->prio))
     ctx->prio = current->prio;
   else
     ctx->prio = current->static_prio;
   ctx->policy = current->policy;
   /*
    * TO DO: the context may be loaded, so we may need to activate
    * it again on a different node. But it shouldn't hurt anything
    * to update its parameters, because we know that the scheduler
    * is not actively looking at this field, since it is not on the
    * runqueue. The context will be rescheduled on the proper node
    * if it is timesliced or preempted.
    */
-  cpumask_copy(&ctx->cpus_allowed, tsk_cpus_allowed(current));
+  cpumask_copy(&ctx->cpus_allowed, &current->cpus_allowed);
   /* Save the current cpu id for spu interrupt routing. */
   ctx->last_ran = raw_smp_processor_id();
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,22 +1,22 @@
 struct sdma_engine *sdma_select_user_engine(struct hfi1_devdata *dd, u32 selector, u8 vl) {
   struct sdma_rht_node *rht_node;
   struct sdma_engine *sde = NULL;
-  const struct cpumask *current_mask = tsk_cpus_allowed(current);
+  const struct cpumask *current_mask = &current->cpus_allowed;
   unsigned long cpu_id;
   /*
    * To ensure that always the same sdma engine(s) will be
    * selected make sure the process is pinned to this CPU only.
    */
   if (cpumask_weight(current_mask) != 1) goto out;
   cpu_id = smp_processor_id();
   rcu_read_lock();
   rht_node = rhashtable_lookup_fast(&dd->sdma_rht, &cpu_id, sdma_rht_params);
   if (rht_node && rht_node->map[vl]) {
     struct sdma_rht_map_elem *map = rht_node->map[vl];
     sde = map->sde[selector & map->mask];
   }
   rcu_read_unlock();
   if (sde) return sde;
 out:
   return sdma_select_engine_vl(dd, selector, vl);
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,26 +1,26 @@
 int check_preemption_disabled(const char *what1, const char *what2) {
   int this_cpu = raw_smp_processor_id();
   if (likely(preempt_count())) goto out;
   if (irqs_disabled()) goto out;
   /*
    * Kernel threads bound to a single CPU can safely use
    * smp_processor_id():
    */
-  if (cpumask_equal(tsk_cpus_allowed(current), cpumask_of(this_cpu))) goto out;
+  if (cpumask_equal(&current->cpus_allowed, cpumask_of(this_cpu))) goto out;
   /*
    * It is valid to assume CPU-locality during early bootup:
    */
   if (system_state != SYSTEM_RUNNING) goto out;
   /*
    * Avoid recursion:
    */
   preempt_disable_notrace();
   if (!printk_ratelimit()) goto out_enable;
   printk(KERN_ERR "BUG: using %s%s() in preemptible [%08x] code: %s/%d\n", what1, what2, preempt_count() - 1, current->comm, current->pid);
   print_symbol("caller is %s\n", (long)__builtin_return_address(0));
   dump_stack();
 out_enable:
   preempt_enable_no_resched_notrace();
 out:
   return this_cpu;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,17 +1,17 @@
 void __init smp_cpus_done(unsigned int max_cpus) {
   cpumask_var_t old_mask;
   /* We want the setup_cpu() here to be called from CPU 0, but our
    * init thread may have been "borrowed" by another CPU in the meantime
    * se we pin us down to CPU 0 for a short while
    */
   alloc_cpumask_var(&old_mask, GFP_NOWAIT);
-  cpumask_copy(old_mask, tsk_cpus_allowed(current));
+  cpumask_copy(old_mask, &current->cpus_allowed);
   set_cpus_allowed_ptr(current, cpumask_of(boot_cpuid));
 
   if (smp_ops && smp_ops->setup_cpu) smp_ops->setup_cpu(boot_cpuid);
   set_cpus_allowed_ptr(current, old_mask);
   free_cpumask_var(old_mask);
   if (smp_ops && smp_ops->bringup_done) smp_ops->bringup_done();
   dump_numa_cpu_topology();
   set_sched_topology(powerpc_topology);
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,10 +1,10 @@
 static unsigned int us2e_freq_get(unsigned int cpu) {
   cpumask_t cpus_allowed;
   unsigned long clock_tick, estar;
-  cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current));
+  cpumask_copy(&cpus_allowed, &current->cpus_allowed);
   set_cpus_allowed_ptr(current, cpumask_of(cpu));
   clock_tick = sparc64_get_clock_tick(cpu) / 1000;
   estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR);
   set_cpus_allowed_ptr(current, &cpus_allowed);
   return clock_tick / estar_to_divisor(estar);
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int us2e_freq_target(struct cpufreq_policy *policy, unsigned int index) {
   unsigned int cpu = policy->cpu;
   unsigned long new_bits, new_freq;
   unsigned long clock_tick, divisor, old_divisor, estar;
   cpumask_t cpus_allowed;
-  cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current));
+  cpumask_copy(&cpus_allowed, &current->cpus_allowed);
   set_cpus_allowed_ptr(current, cpumask_of(cpu));
   new_freq = clock_tick = sparc64_get_clock_tick(cpu) / 1000;
   new_bits = index_to_estar_mode(index);
   divisor = index_to_divisor(index);
   new_freq /= divisor;
   estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR);
   old_divisor = estar_to_divisor(estar);
   if (old_divisor != divisor) us2e_transition(estar, new_bits, clock_tick * 1000, old_divisor, divisor);
   set_cpus_allowed_ptr(current, &cpus_allowed);
   return 0;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,11 +1,11 @@
 static unsigned int us3_freq_get(unsigned int cpu) {
   cpumask_t cpus_allowed;
   unsigned long reg;
   unsigned int ret;
-  cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current));
+  cpumask_copy(&cpus_allowed, &current->cpus_allowed);
   set_cpus_allowed_ptr(current, cpumask_of(cpu));
   reg = read_safari_cfg();
   ret = get_current_freq(cpu, reg);
   set_cpus_allowed_ptr(current, &cpus_allowed);
   return ret;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,29 +1,29 @@
 static int us3_freq_target(struct cpufreq_policy *policy, unsigned int index) {
   unsigned int cpu = policy->cpu;
   unsigned long new_bits, new_freq, reg;
   cpumask_t cpus_allowed;
-  cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current));
+  cpumask_copy(&cpus_allowed, &current->cpus_allowed);
   set_cpus_allowed_ptr(current, cpumask_of(cpu));
   new_freq = sparc64_get_clock_tick(cpu) / 1000;
   switch (index) {
   case 0:
     new_bits = SAFARI_CFG_DIV_1;
     new_freq /= 1;
     break;
   case 1:
     new_bits = SAFARI_CFG_DIV_2;
     new_freq /= 2;
     break;
   case 2:
     new_bits = SAFARI_CFG_DIV_32;
     new_freq /= 32;
     break;
   default: BUG();
   }
   reg = read_safari_cfg();
   reg &= ~SAFARI_CFG_DIV_MASK;
   reg |= new_bits;
   write_safari_cfg(reg);
   set_cpus_allowed_ptr(current, &cpus_allowed);
   return 0;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed
--- initial
+++ final
@@ -1,10 +1,10 @@
 static unsigned long run_on_cpu(unsigned long cpu, unsigned long (*func)(unsigned long), unsigned long arg) {
   cpumask_t old_affinity;
   unsigned long ret;
-  cpumask_copy(&old_affinity, tsk_cpus_allowed(current));
+  cpumask_copy(&old_affinity, &current->cpus_allowed);
   /* should return -EINVAL to userspace */
   if (set_cpus_allowed_ptr(current, cpumask_of(cpu))) return 0;
   ret = func(arg);
   set_cpus_allowed_ptr(current, &old_affinity);
   return ret;
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed