mpss-modules fails to build on newer kernel (centos 7.4.)

mpss-modules fails to build on newer kernel (centos 7.4.)

@devel - would there be work on fixes in progress? Or workaround available? Many thanks, L.

 static inline void sysfs_notify_dirent(struct kernfs_node *kn)
                    ^
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.c: In function 'mic_probe':
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.c:343:5: error: too many arguments to function 'sysfs_get_dirent'
     "state");
     ^
In file included from include/linux/kobject.h:21:0,
                 from include/linux/slub_def.h:13,
                 from include/linux/slab.h:282,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic/micscif_kmem_cache.h:40,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.c:38:
include/linux/sysfs.h:489:35: note: declared here
 static inline struct kernfs_node *sysfs_get_dirent(struct kernfs_node *parent,
                                   ^
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.c:339:23: warning: assignment from incompatible pointer type [enabled by default]
  mic_ctx->sysfs_state = sysfs_get_dirent(mic_ctx->bd_info->bi_sysfsdev->kobj.sd,
                       ^
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.c: In function 'mic_remove':
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.c:404:2: warning: passing argument 1 of 'sysfs_put' from incompatible pointer type [enabled by default]
  sysfs_put(bd_info->bi_ctx.sysfs_state);
  ^
In file included from include/linux/kobject.h:21:0,
                 from include/linux/slub_def.h:13,
                 from include/linux/slab.h:282,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic/micscif_kmem_cache.h:40,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.c:38:
include/linux/sysfs.h:501:20: note: expected 'struct kernfs_node *' but argument is of type 'struct sysfs_dirent *'
 static inline void sysfs_put(struct kernfs_node *kn)
                    ^
In file included from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/micint.h:68:0,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linvnet.c:36:
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h: In function 'mic_setstate':
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h:705:3: warning: passing argument 1 of 'sysfs_notify_dirent' from incompatible pointer type [enabled by default]
   sysfs_notify_dirent(mic_ctx->sysfs_state);
   ^
In file included from include/linux/kobject.h:21:0,
                 from include/linux/module.h:16,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/micint.h:39,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linvnet.c:36:
include/linux/sysfs.h:484:20: note: expected 'struct kernfs_node *' but argument is of type 'struct sysfs_dirent *'
 static inline void sysfs_notify_dirent(struct kernfs_node *kn)
                    ^
In file included from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/micint.h:68:0,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/micpsmi.c:36:
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h: In function 'mic_setstate':
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h:705:3: warning: passing argument 1 of 'sysfs_notify_dirent' from incompatible pointer type [enabled by default]
   sysfs_notify_dirent(mic_ctx->sysfs_state);
   ^
In file included from include/linux/kobject.h:21:0,
                 from include/linux/module.h:16,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/micint.h:39,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/micpsmi.c:36:
include/linux/sysfs.h:484:20: note: expected 'struct kernfs_node *' but argument is of type 'struct sysfs_dirent *'
 static inline void sysfs_notify_dirent(struct kernfs_node *kn)
                    ^
  CC [M]  /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/uos_download.o
In file included from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/micint.h:68:0,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/acptboot.c:40:
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h: In function 'mic_setstate':
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h:705:3: warning: passing argument 1 of 'sysfs_notify_dirent' from incompatible pointer type [enabled by default]
   sysfs_notify_dirent(mic_ctx->sysfs_state);
   ^
In file included from include/linux/kobject.h:21:0,
                 from include/linux/module.h:16,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/acptboot.c:37:
include/linux/sysfs.h:484:20: note: expected 'struct kernfs_node *' but argument is of type 'struct sysfs_dirent *'
 static inline void sysfs_notify_dirent(struct kernfs_node *kn)
                    ^
make[2]: *** [/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linvnet.c: At top level:
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linvnet.c:206:2: error: unknown field 'ndo_change_mtu' specified in initializer
  .ndo_change_mtu  = micveth_change_mtu,
  ^
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linvnet.c:206:2: warning: initialization from incompatible pointer type [enabled by default]
/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linvnet.c:206:2: warning: (near initialization for 'veth_netdev_ops.ndo_validate_addr') [enabled by default]
make[2]: *** [/root/rpmbuild/BUILD/mpss-modules-3.8.4/host/linvnet.o] Error 1
In file included from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/uos_download.c:38:0:
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h: In function 'mic_setstate':
/root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h:705:3: warning: passing argument 1 of 'sysfs_notify_dirent' from incompatible pointer type [enabled by default]
   sysfs_notify_dirent(mic_ctx->sysfs_state);
   ^
In file included from include/linux/kobject.h:21:0,
                 from include/linux/slub_def.h:13,
                 from include/linux/slab.h:282,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/include/mic_common.h:47,
                 from /root/rpmbuild/BUILD/mpss-modules-3.8.4/host/uos_download.c:38:
include/linux/sysfs.h:484:20: note: expected 'struct kernfs_node *' but argument is of type 'struct sysfs_dirent *'
 static inline void sysfs_notify_dirent(struct kernfs_node *kn)
                    ^
make[1]: *** [_module_/root/rpmbuild/BUILD/mpss-modules-3.8.4] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-862.el7.x86_64'
make: *** [modules] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.4HN7T6 (%build)

 

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

first of all, the mpss-modules are building just fine on my CentSO 7.4 kernel 3.10.0-693.21.1.el7.x86_64 (the current kernel). Note that building on the (experimental) kernel-alt 4.x kernels is NOT supported.

It seems you are trying to build and link against the (beta) 7.5 kernel 3.10.0.862 - I am sure Intel will update their MPSS stack once  RHEL 7.5 is officially released :)

Which build commands are you using?

I just ran

make -C /lib/modules/3.10.0-693.21.1.el7.x86_64/build M=/local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4 modules \
	INSTALL_MOD_PATH=
make[1]: Entering directory `/usr/src/kernels/3.10.0-693.21.1.el7.x86_64'
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/dma/mic_dma_lib.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/dma/mic_dma_md.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/acptboot.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/ioctl.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linpm.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linpsmi.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linscif_host.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linsysfs.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linux.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linvcons.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linvnet.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/micpsmi.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/micscif_pm.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/pm_ioctl.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/pm_pcstate.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/tools_support.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/uos_download.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/vhost/mic_vhost.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/vhost/mic_blk.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/vmcore.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_api.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_debug.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_fd.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_intr.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_nm.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_nodeqp.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_ports.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rb.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rma_dma.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rma_list.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rma.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_select.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_smpt.o
  CC [M]  /local/usersmake -C /lib/modules/3.10.0-693.21.1.el7.x86_64/build M=/local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4 modules \
	INSTALL_MOD_PATH=
make[1]: Entering directory `/usr/src/kernels/3.10.0-693.21.1.el7.x86_64'
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/dma/mic_dma_lib.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/dma/mic_dma_md.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/acptboot.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/ioctl.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linpm.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linpsmi.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linscif_host.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linsysfs.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linux.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linvcons.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/linvnet.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/micpsmi.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/micscif_pm.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/pm_ioctl.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/pm_pcstate.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/tools_support.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/uos_download.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/vhost/mic_vhost.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/vhost/mic_blk.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/host/vmcore.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_api.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_debug.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_fd.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_intr.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_nm.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_nodeqp.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_ports.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rb.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rma_dma.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rma_list.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_rma.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_select.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_smpt.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_sysfs.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_va_gen.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_va_node.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/vnet/micveth_dma.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/vnet/micveth_param.o
  LD [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/mic.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/mic.mod.o
  LD [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/mic.ko
make[1]: Leaving directory `/usr/src/kernels/3.10.0-693.21.1.el7.x86_64'
/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_sysfs.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_va_gen.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/micscif/micscif_va_node.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/vnet/micveth_dma.o
  CC [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/vnet/micveth_param.o
  LD [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/mic.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/mic.mod.o
  LD [M]  /local/users/janjust/src/mpss-3.8.4/src/mpss-modules-3.8.4/mic.ko
make[1]: Leaving directory `/usr/src/kernels/3.10.0-693.21.1.el7.x86_64'

 

CentOS 7.5 was released yesterday, so the problem is now official ;)

The following hack-patch fixed the module compilation, and the resulting mic.ko works on my CentOS 7.5 box with KNC card. I hope Intel will provide a better patch in an update to the MPSS stack

--- mpss-modules-3.8.4/host/linux.c	2016-05-31 09:48:37.000000000 +0200
+++ mpss-modules-3.8.4jjk/host/linux.c	2018-05-17 15:28:56.139635516 +0200
@@ -337,7 +337,7 @@
 			NULL, "mic%d", mic_ctx->bd_info->bi_ctx.bi_id);
 	err = sysfs_create_group(&mic_ctx->bd_info->bi_sysfsdev->kobj, &bd_attr_group);
 	mic_ctx->sysfs_state = sysfs_get_dirent(mic_ctx->bd_info->bi_sysfsdev->kobj.sd,
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35) && LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35) && LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
 				NULL,
 #endif
 				"state");
--- mpss-modules-3.8.4/host/linvnet.c	2016-05-31 09:48:37.000000000 +0200
+++ mpss-modules-3.8.4jjk/host/linvnet.c	2018-05-17 15:45:08.597678495 +0200
@@ -203,7 +203,7 @@
 	.ndo_set_multicast_list = micveth_multicast_list,
 #endif
 	.ndo_set_mac_address	= micveth_set_address,
-	.ndo_change_mtu		= micveth_change_mtu,
+	.ndo_change_mtu_rh74	= micveth_change_mtu,
 };
 #endif
 
--- mpss-modules-3.8.4/vnet/micveth_dma.c	2016-05-31 09:48:37.000000000 +0200
+++ mpss-modules-3.8.4jjk/vnet/micveth_dma.c	2018-05-17 15:46:17.078060653 +0200
@@ -910,7 +910,7 @@
 	.ndo_set_multicast_list = micvnet_multicast_list,
 #endif
 	.ndo_set_mac_address	= micvnet_set_address,
-	.ndo_change_mtu		= micvnet_change_mtu,
+	.ndo_change_mtu_rh74	= micvnet_change_mtu,
 };
 
 static void

 

JJK, thank you, your hack-patch appears to have worked for me on CentOS 7.5 with the 862 kernel.  Please let us know here if you run into any problems, and I will do the same, but after making the adjustment I was able to access the MIC, update the firmware, and SSH into the device, so things are looking good so far.

I just set up a CentOS 7.5 system on May 16th (like, yesterday), discovered it wouldn't build and I needed to back down to the CentOS 7.4 kernel (693), wiped and reinstalled with 7.4, then it auto-patched itself back up to 7.5!  So I was about to downgrade the kernel itself and freeze updates, but then I discovered your timely post today, and it saved me the hassle.  Once again, thank you for your help.

Months later and still no fixed, updated version.

@ Intel - why? and eventually when?
 

FWIW:   I posted a page where you can download a pre-built RPM with mpss modules for the CentOS 7.5 kernel:

  https://software.intel.com/en-us/forums/intel-many-integrated-core/topic/781750

Leave a Comment

Please sign in to add a comment. Not a member? Join today