Skip to content

Commit

Permalink
Replace cpu_sibling_mask() with topology_sibling_cpumask()
Browse files Browse the repository at this point in the history
Closes=Bug: #1555511

Change-Id: I84db0b0fb853f049aeddb8bbdba67fc9f54eb59d
  • Loading branch information
Édouard Thuleau authored and pupapaik committed Apr 13, 2016
1 parent 61241c0 commit 7101cab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions linux/vr_host_interface.c
Expand Up @@ -569,15 +569,24 @@ linux_get_rxq(struct sk_buff *skb, u16 *rxq, unsigned int curr_cpu,
* Clear the bits corresponding to the current core and its hyperthreads
* in the node CPU mask.
*/
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4,2,0))
cpumask_andnot(&noht_cpumask, node_cpumask, cpu_sibling_mask(curr_cpu));
#else
cpumask_andnot(&noht_cpumask, node_cpumask,
topology_sibling_cpumask(curr_cpu));
#endif

/*
* If the previous CPU is specified, clear the bits corresponding to
* that core and its hyperthreads in the CPU mask.
*/
if (prev_cpu && (prev_cpu <= nr_cpu_ids)) {
cpumask_andnot(&noht_cpumask, &noht_cpumask,
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4,2,0))
cpu_sibling_mask(prev_cpu-1));
#else
topology_sibling_cpumask(prev_cpu-1));
#endif
}

num_cpus = cpumask_weight(&noht_cpumask);
Expand Down

0 comments on commit 7101cab

Please sign in to comment.