Fail to build Linux kernel module with kernel upper than 4.2.0

Bug #1555511 reported by Édouard Thuleau
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
Undecided
Unassigned
Trunk
Fix Committed
Undecided
Unassigned
OpenContrail
Fix Committed
Undecided
Unassigned

Bug Description

On updated Ubuntu trusty, the kernel module fails to build:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `vrouter/utils' is up to date.
scons: `vrouter/uvrouter' is up to date.
cd /opt/stack/contrail/vrouter/ && make SANDESH_HEADER_PATH=/opt/stack/contrail/build/debug/vrouter SANDESH_SRC_ROOT=../build/kbuild/ SANDESH_EXTRA_HEADER_PATH=/opt/stack/contrail/tools
make -C /lib/modules/4.2.0-30-generic/build M=/opt/stack/contrail/vrouter modules
make[1]: Entering directory `/usr/src/linux-headers-4.2.0-30-generic'
  CC [M] /opt/stack/contrail/vrouter/linux/vr_host_interface.o
/opt/stack/contrail/vrouter/linux/vr_host_interface.c: In function ‘linux_get_rxq’:
/opt/stack/contrail/vrouter/linux/vr_host_interface.c:573:5: error: implicit declaration of function ‘cpu_sibling_mask’ [-Werror=implicit-function-declaration]
     cpumask_andnot(&noht_cpumask, node_cpumask, cpu_sibling_mask(curr_cpu));
     ^
/opt/stack/contrail/vrouter/linux/vr_host_interface.c:573:5: warning: passing argument 3 of ‘cpumask_andnot’ makes pointer from integer without a cast [enabled by default]
In file included from ./arch/x86/include/asm/cpumask.h:4:0,
                 from ./arch/x86/include/asm/msr.h:10,
                 from ./arch/x86/include/asm/processor.h:20,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from include/linux/preempt.h:64,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from /opt/stack/contrail/vrouter/linux/vr_host_interface.c:9:
include/linux/cpumask.h:394:19: note: expected ‘const struct cpumask *’ but argument is of type ‘int’
 static inline int cpumask_andnot(struct cpumask *dstp,
                   ^
/opt/stack/contrail/vrouter/linux/vr_host_interface.c:586:24: warning: passing argument 3 of ‘cpumask_andnot’ makes pointer from integer without a cast [enabled by default]
                        cpu_sibling_mask(prev_cpu-1));
                        ^
In file included from ./arch/x86/include/asm/cpumask.h:4:0,
                 from ./arch/x86/include/asm/msr.h:10,
                 from ./arch/x86/include/asm/processor.h:20,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from include/linux/preempt.h:64,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from /opt/stack/contrail/vrouter/linux/vr_host_interface.c:9:
include/linux/cpumask.h:394:19: note: expected ‘const struct cpumask *’ but argument is of type ‘int’
 static inline int cpumask_andnot(struct cpumask *dstp,
                   ^
cc1: some warnings being treated as errors
make[2]: *** [/opt/stack/contrail/vrouter/linux/vr_host_interface.o] Error 1
make[1]: *** [_module_/opt/stack/contrail/vrouter] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-4.2.0-30-generic'
make: *** [default] Error 2
scons: *** [vrouter/vrouter.ko] Error 2
scons: building terminated because of errors.

Tags: vrouter
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/18320
Submitter: ?douard Thuleau (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18320
Committed: http://github.org/Juniper/contrail-vrouter/commit/64f081bad1122a2142efaaa6bad540ed0a927fa4
Submitter: Zuul
Branch: master

commit 64f081bad1122a2142efaaa6bad540ed0a927fa4
Author: Édouard Thuleau <email address hidden>
Date: Thu Mar 10 11:00:28 2016 +0100

Replace cpu_sibling_mask() with topology_sibling_cpumask()

Closes=Bug: #1555511

Change-Id: I84db0b0fb853f049aeddb8bbdba67fc9f54eb59d

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/19263
Submitter: Jakub Pavlik (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/19263
Committed: http://github.org/Juniper/contrail-vrouter/commit/7101cab74e558fbe17741ee5ddde4c3f8bdff199
Submitter: Zuul
Branch: R3.0

commit 7101cab74e558fbe17741ee5ddde4c3f8bdff199
Author: Édouard Thuleau <email address hidden>
Date: Thu Mar 10 11:00:28 2016 +0100

Replace cpu_sibling_mask() with topology_sibling_cpumask()

Closes=Bug: #1555511

Change-Id: I84db0b0fb853f049aeddb8bbdba67fc9f54eb59d

Changed in opencontrail:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.