From 7101cab74e558fbe17741ee5ddde4c3f8bdff199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89douard=20Thuleau?= Date: Thu, 10 Mar 2016 11:00:28 +0100 Subject: [PATCH] Replace cpu_sibling_mask() with topology_sibling_cpumask() Closes=Bug: #1555511 Change-Id: I84db0b0fb853f049aeddb8bbdba67fc9f54eb59d --- linux/vr_host_interface.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/linux/vr_host_interface.c b/linux/vr_host_interface.c index 99bebd735..8d836b985 100644 --- a/linux/vr_host_interface.c +++ b/linux/vr_host_interface.c @@ -569,7 +569,12 @@ 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 @@ -577,7 +582,11 @@ linux_get_rxq(struct sk_buff *skb, u16 *rxq, unsigned int curr_cpu, */ 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);