Index: head/sys/conf/kmod.mk =================================================================== --- head/sys/conf/kmod.mk (revision 359184) +++ head/sys/conf/kmod.mk (revision 359185) @@ -1,532 +1,542 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 # $FreeBSD$ # # The include file handles building and installing loadable # kernel modules. # # # +++ variables +++ # # CLEANFILES Additional files to remove for the clean and cleandir targets. # # EXPORT_SYMS A list of symbols that should be exported from the module, # or the name of a file containing a list of symbols, or YES # to export all symbols. If not defined, no symbols are # exported. # # KMOD The name of the kernel module to build. # # KMODDIR Base path for kernel modules (see kld(4)). [/boot/kernel] # # KMODOWN Module file owner. [${BINOWN}] # # KMODGRP Module file group. [${BINGRP}] # # KMODMODE Module file mode. [${BINMODE}] # # KMODLOAD Command to load a kernel module [/sbin/kldload] # # KMODUNLOAD Command to unload a kernel module [/sbin/kldunload] # # KMODISLOADED Command to check whether a kernel module is # loaded [/sbin/kldstat -q -n] # # PROG The name of the kernel module to build. # If not supplied, ${KMOD}.ko is used. # # SRCS List of source files. # # FIRMWS List of firmware images in format filename:shortname:version # # FIRMWARE_LICENSE # Set to the name of the license the user has to agree on in # order to use this firmware. See /usr/share/doc/legal # # DESTDIR The tree where the module gets installed. [not set] # # KERNBUILDDIR # Set to the location of the kernel build directory where # the opt_*.h files, .o's and kernel winds up. # # +++ targets +++ # # install: # install the kernel module; if the Makefile # does not itself define the target install, the targets # beforeinstall and afterinstall may also be used to cause # actions immediately before and after the install target # is executed. # # load: # Load a module. # # unload: # Unload a module. # # reload: # Unload if loaded, then load. # AWK?= awk KMODLOAD?= /sbin/kldload KMODUNLOAD?= /sbin/kldunload KMODISLOADED?= /sbin/kldstat -q -n OBJCOPY?= objcopy .include "kmod.opts.mk" .include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m # amd64 and mips use direct linking for kmod, all others use shared binaries .if ${MACHINE_CPUARCH} != amd64 && ${MACHINE_CPUARCH} != mips __KLD_SHARED=yes .else __KLD_SHARED=no .endif .if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing .endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000 WERROR?= -Wno-error .else WERROR?= -Werror .endif +LINUXKPI_GENSRCS+= \ + bus_if.h \ + device_if.h \ + pci_if.h \ + pci_iov_if.h \ + vnode_if.h \ + usb_if.h \ + opt_usb.h \ + opt_stack.h + CFLAGS+= ${WERROR} CFLAGS+= -D_KERNEL CFLAGS+= -DKLD_MODULE .if defined(MODULE_TIED) CFLAGS+= -DKLD_TIED .endif # Don't use any standard or source-relative include directories. NOSTDINC= -nostdinc CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*} .if defined(KERNBUILDDIR) CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h .else SRCS+= opt_global.h CFLAGS+= -include ${.OBJDIR}/opt_global.h .endif # Add -I paths for system headers. Individual module makefiles don't # need any -I paths for this. Similar defaults for .PATH can't be # set because there are no standard paths for non-headers. CFLAGS+= -I. -I${SYSDIR} -I${SYSDIR}/contrib/ck/include CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT} CFLAGS.gcc+= -fms-extensions CFLAGS.gcc+= --param inline-unit-growth=100 CFLAGS.gcc+= --param large-function-growth=1000 # Disallow common variables, and if we end up with commons from # somewhere unexpected, allocate storage for them in the module itself. CFLAGS+= -fno-common LDFLAGS+= -d -warn-common .if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= --build-id=sha1 .endif CFLAGS+= ${DEBUG_FLAGS} .if ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \ ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -fPIC .endif # Temporary workaround for PR 196407, which contains the fascinating details. # Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm .if ${COMPILER_VERSION} < 30800 CFLAGS.clang+= -mllvm -arm-use-movt=0 .else CFLAGS.clang+= -mno-movt .endif CFLAGS.clang+= -mfpu=none CFLAGS+= -funwind-tables .endif .if ${MACHINE_CPUARCH} == powerpc CFLAGS+= -mlongcall -fno-omit-frame-pointer .if ${LINKER_TYPE} == "lld" # TOC optimization in LLD (9.0) currently breaks kernel modules, so disable it LDFLAGS+= --no-toc-optimize .endif .endif .if ${MACHINE_CPUARCH} == mips CFLAGS+= -G0 -fno-pic -mno-abicalls -mlong-calls .endif .if defined(DEBUG) || defined(DEBUG_FLAGS) CTFFLAGS+= -g .endif .if defined(FIRMWS) ${KMOD:S/$/.c/}: ${SYSDIR}/tools/fw_stub.awk ${AWK} -f ${SYSDIR}/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} \ ${FIRMWARE_LICENSE:C/.+/-l/}${FIRMWARE_LICENSE} SRCS+= ${KMOD:S/$/.c/} CLEANFILES+= ${KMOD:S/$/.c/} .for _firmw in ${FIRMWS} ${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} @if [ -e ${_firmw:C/\:.*$//} ]; then \ ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ -m ${LD_EMULATION} -r -d \ -o ${.TARGET} ${_firmw:C/\:.*$//}; \ else \ ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \ ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ -m ${LD_EMULATION} -r -d \ -o ${.TARGET} ${_firmw:C/\:.*$//}; \ rm ${_firmw:C/\:.*$//}; \ fi OBJS+= ${_firmw:C/\:.*$/.fwo/:T} .endfor .endif # Conditionally include SRCS based on kernel config options. .for _o in ${KERN_OPTS} SRCS+=${SRCS.${_o}} .endfor OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if !defined(PROG) PROG= ${KMOD}.ko .endif .if !defined(DEBUG_FLAGS) FULLPROG= ${PROG} .else FULLPROG= ${PROG}.full ${PROG}: ${FULLPROG} ${PROG}.debug ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \ ${FULLPROG} ${.TARGET} ${PROG}.debug: ${FULLPROG} ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} .endif .if ${__KLD_SHARED} == yes ${FULLPROG}: ${KMOD}.kld ${LD} -m ${LD_EMULATION} -Bshareable -znotext -znorelro ${_LDFLAGS} \ -o ${.TARGET} ${KMOD}.kld .if !defined(DEBUG_FLAGS) ${OBJCOPY} --strip-debug ${.TARGET} .endif .endif EXPORT_SYMS?= NO .if ${EXPORT_SYMS} != YES CLEANFILES+= export_syms .endif .if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE_ARCH}) LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE_ARCH} .endif .if ${__KLD_SHARED} == yes ${KMOD}.kld: ${OBJS} .else ${FULLPROG}: ${OBJS} .endif ${LD} -m ${LD_EMULATION} ${_LDFLAGS} ${LDSCRIPT_FLAGS} -r -d \ -o ${.TARGET} ${OBJS} .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .if defined(EXPORT_SYMS) .if ${EXPORT_SYMS} != YES .if ${EXPORT_SYMS} == NO :> export_syms .elif !exists(${.CURDIR}/${EXPORT_SYMS}) echo -n "${EXPORT_SYMS:@s@$s${.newline}@}" > export_syms .else grep -v '^#' < ${EXPORT_SYMS} > export_syms .endif ${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \ export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .endif # defined(EXPORT_SYMS) .if defined(PREFIX_SYMS) ${AWK} -v prefix=${PREFIX_SYMS} -f ${SYSDIR}/conf/kmod_syms_prefix.awk \ ${.TARGET} /dev/null | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no ${OBJCOPY} --strip-debug ${.TARGET} .endif .if ${COMPILER_TYPE} == "clang" || \ (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) _MAP_DEBUG_PREFIX= yes .endif _ILINKS=machine .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _ILINKS+=x86 .endif CLEANFILES+=${_ILINKS} all: ${PROG} beforedepend: ${_ILINKS} beforebuild: ${_ILINKS} # Ensure that the links exist without depending on it when it exists which # causes all the modules to be rebuilt when the directory pointed to changes. # Ensure that debug info references the path in the source tree. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) OBJS_DEPEND_GUESS+= ${_link} .endif .if defined(_MAP_DEBUG_PREFIX) .if ${_link} == "machine" CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include .else CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include .endif .endif .endfor .NOPATH: ${_ILINKS} ${_ILINKS}: @case ${.TARGET} in \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ *) \ path=${SYSDIR}/${.TARGET:T}/include ;; \ esac ; \ path=`(cd $$path && /bin/pwd)` ; \ ${ECHO} ${.TARGET:T} "->" $$path ; \ ln -fns $$path ${.TARGET:T} CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} .if defined(DEBUG_FLAGS) CLEANFILES+= ${FULLPROG} ${PROG}.debug .endif .if !target(install) _INSTALLFLAGS:= ${INSTALLFLAGS} .for ie in ${INSTALLFLAGS_EDIT} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} .endfor .if !target(realinstall) KERN_DEBUGDIR?= ${DEBUGDIR} realinstall: _kmodinstall .ORDER: beforeinstall _kmodinstall _kmodinstall: .PHONY ${INSTALL} -T release -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/ .if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -T debug -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR}/ .endif .include .if !defined(NO_XREF) afterinstall: _kldxref .ORDER: realinstall _kldxref .ORDER: _installlinks _kldxref _kldxref: .PHONY @if type kldxref >/dev/null 2>&1; then \ ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ fi .endif .endif # !target(realinstall) .endif # !target(install) .if !target(load) load: ${PROG} .PHONY ${KMODLOAD} -v ${.OBJDIR}/${PROG} .endif .if !target(unload) unload: .PHONY if ${KMODISLOADED} ${PROG} ; then ${KMODUNLOAD} -v ${PROG} ; fi .endif .if !target(reload) reload: unload load .PHONY .endif .if defined(KERNBUILDDIR) .PATH: ${KERNBUILDDIR} CFLAGS+= -I${KERNBUILDDIR} .for _src in ${SRCS:Mopt_*.h} CLEANFILES+= ${_src} .if !target(${_src}) ${_src}: ln -sf ${KERNBUILDDIR}/${_src} ${.TARGET} .endif .endfor .else .for _src in ${SRCS:Mopt_*.h} CLEANFILES+= ${_src} .if !target(${_src}) ${_src}: :> ${.TARGET} .endif .endfor .endif # Add the sanitizer C flags CFLAGS+= ${SAN_CFLAGS} # Add the gcov flags CFLAGS+= ${GCOV_CFLAGS} # Respect configuration-specific C flags. CFLAGS+= ${ARCH_FLAGS} ${CONF_CFLAGS} .if !empty(SRCS:Mvnode_if.c) CLEANFILES+= vnode_if.c vnode_if.c: ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -c .endif .if !empty(SRCS:Mvnode_if.h) CLEANFILES+= vnode_if.h vnode_if_newproto.h vnode_if_typedef.h vnode_if.h vnode_if_newproto.h vnode_if_typedef.h: ${SYSDIR}/tools/vnode_if.awk \ ${SYSDIR}/kern/vnode_if.src vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -h vnode_if_newproto.h: ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -p vnode_if_typedef.h: ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -q .endif # Build _if.[ch] from _if.m, and clean them when we're done. # __MPATH defined in config.mk _MFILES=${__MPATH:T:O} _MPATH=${__MPATH:H:O:u} .PATH.m: ${_MPATH} .for _i in ${SRCS:M*_if.[ch]} _MATCH=M${_i:R:S/$/.m/} _MATCHES=${_MFILES:${_MATCH}} .if !empty(_MATCHES) CLEANFILES+= ${_i} .endif .endfor # _i .m.c: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c .m.h: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -h .for _i in mii pccard .if !empty(SRCS:M${_i}devs.h) CLEANFILES+= ${_i}devs.h ${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs ${AWK} -f ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs .endif .endfor # _i .if !empty(SRCS:Mbhnd_nvram_map.h) CLEANFILES+= bhnd_nvram_map.h bhnd_nvram_map.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map bhnd_nvram_map.h: sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map -h .endif .if !empty(SRCS:Mbhnd_nvram_map_data.h) CLEANFILES+= bhnd_nvram_map_data.h bhnd_nvram_map_data.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map bhnd_nvram_map_data.h: sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map -d .endif .if !empty(SRCS:Musbdevs.h) CLEANFILES+= usbdevs.h usbdevs.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -h .endif .if !empty(SRCS:Musbdevs_data.h) CLEANFILES+= usbdevs_data.h usbdevs_data.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -d .endif .if !empty(SRCS:Msdiodevs.h) CLEANFILES+= sdiodevs.h sdiodevs.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -h .endif .if !empty(SRCS:Msdiodevs_data.h) CLEANFILES+= sdiodevs_data.h sdiodevs_data.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -d .endif .if !empty(SRCS:Macpi_quirks.h) CLEANFILES+= acpi_quirks.h acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks ${AWK} -f ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks .endif .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) CLEANFILES+= assym.inc genassym.o DEPENDOBJS+= genassym.o DPSRCS+= offset.inc .endif .if defined(MODULE_TIED) DPSRCS+= offset.inc .endif .if !empty(SRCS:Moffset.inc) || !empty(DPSRCS:Moffset.inc) CLEANFILES+= offset.inc genoffset.o DEPENDOBJS+= genoffset.o .endif assym.inc: genassym.o offset.inc: genoffset.o assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc genassym.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/kern/genoffset.c CLEANDEPENDFILES+= ${_ILINKS} # .depend needs include links so we remove them only together. cleanilinks: rm -f ${_ILINKS} OBJS_DEPEND_GUESS+= ${SRCS:M*.h} .if defined(KERNBUILDDIR) OBJS_DEPEND_GUESS+= opt_global.h .endif .include .include .include .include "kern.mk" Index: head/sys/modules/cxgbe/iw_cxgbe/Makefile =================================================================== --- head/sys/modules/cxgbe/iw_cxgbe/Makefile (revision 359184) +++ head/sys/modules/cxgbe/iw_cxgbe/Makefile (revision 359185) @@ -1,32 +1,25 @@ # $FreeBSD$ CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE}/iw_cxgbe KMOD= iw_cxgbe -SRCS= bus_if.h SRCS+= cm.c SRCS+= cq.c SRCS+= device.c -SRCS+= device_if.h SRCS+= ev.c SRCS+= id_table.c SRCS+= mem.c -SRCS+= opt_inet.h -SRCS+= opt_ktr.h -SRCS+= opt_ofed.h -SRCS+= opt_sched.h -SRCS+= pci_if.h -SRCS+= pcib_if.h SRCS+= provider.c SRCS+= qp.c SRCS+= resource.c -SRCS+= vnode_if.h +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h opt_ktr.h opt_ofed.h opt_sched.h CFLAGS+= -I${CXGBE} -I${SRCTOP}/sys/ofed/include -DLINUX_TYPES_DEFINED CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET .include Index: head/sys/modules/ibcore/Makefile =================================================================== --- head/sys/modules/ibcore/Makefile (revision 359184) +++ head/sys/modules/ibcore/Makefile (revision 359185) @@ -1,41 +1,42 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/ofed/drivers/infiniband/core KMOD= ibcore -SRCS= vnode_if.h device_if.h bus_if.h pci_if.h pci_iov_if.h \ - opt_inet.h opt_inet6.h \ +SRCS= \ ib_addr.c \ ib_agent.c \ ib_cache.c \ ib_cm.c \ ib_cma.c \ ib_cq.c \ ib_device.c \ ib_fmr_pool.c \ ib_iwcm.c \ ib_iwpm_msg.c \ ib_iwpm_util.c \ ib_mad.c \ ib_mad_rmpp.c \ ib_multicast.c \ ib_packer.c \ ib_roce_gid_mgmt.c \ ib_sa_query.c \ ib_smi.c \ ib_sysfs.c \ ib_ucm.c \ ib_ucma.c \ ib_ud_header.c \ ib_umem.c \ ib_user_mad.c \ ib_uverbs_cmd.c \ ib_uverbs_main.c \ ib_uverbs_marshall.c \ ib_verbs.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DINET6 -DINET -DCONFIG_INFINIBAND_USER_MEM .include Index: head/sys/modules/ipoib/Makefile =================================================================== --- head/sys/modules/ipoib/Makefile (revision 359184) +++ head/sys/modules/ipoib/Makefile (revision 359185) @@ -1,17 +1,17 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/ofed/drivers/infiniband/ulp/ipoib KMOD= ipoib -SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ - opt_inet.h opt_inet6.h opt_ofed.h \ - ipoib_cm.c ipoib_ib.c ipoib_main.c \ +SRCS= ipoib_cm.c ipoib_ib.c ipoib_main.c \ ipoib_multicast.c ipoib_verbs.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h opt_ofed.h CFLAGS+= -I${SRCTOP}/sys/ofed/drivers/infiniband/ulp/ipoib CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith Index: head/sys/modules/iser/Makefile =================================================================== --- head/sys/modules/iser/Makefile (revision 359184) +++ head/sys/modules/iser/Makefile (revision 359185) @@ -1,34 +1,30 @@ # $FreeBSD$ SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" .PATH: ${SYSDIR}/dev/iser/ KMOD= iser SRCS= icl_iser.c SRCS+= iser_initiator.c SRCS+= iser_memory.c SRCS+= iser_verbs.c -SRCS+= vnode_if.h -SRCS+= opt_inet.h -SRCS+= opt_inet6.h -SRCS+= opt_cam.h -SRCS+= bus_if.h -SRCS+= device_if.h -SRCS+= icl_conn_if.h + +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h opt_cam.h icl_conn_if.h CFLAGS+= -I${SYSDIR}/ CFLAGS+= -I${SYSDIR}/ofed/include CFLAGS+= -I${SYSDIR}/ofed/include/uapi CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET CFLAGS+= -fms-extensions CFLAGS+=-DICL_KERNEL_PROXY MFILES= kern/bus_if.m kern/device_if.m dev/iscsi/icl_conn_if.m .include Index: head/sys/modules/lindebugfs/Makefile =================================================================== --- head/sys/modules/lindebugfs/Makefile (revision 359184) +++ head/sys/modules/lindebugfs/Makefile (revision 359185) @@ -1,12 +1,11 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/compat/lindebugfs KMOD= lindebugfs -SRCS= vnode_if.h \ - device_if.h bus_if.h pci_if.h \ - lindebugfs.c +SRCS= lindebugfs.c +SRCS+= ${LINUXKPI_GENSRCS} CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .include Index: head/sys/modules/linuxkpi/Makefile =================================================================== --- head/sys/modules/linuxkpi/Makefile (revision 359184) +++ head/sys/modules/linuxkpi/Makefile (revision 359185) @@ -1,36 +1,29 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/compat/linuxkpi/common/src KMOD= linuxkpi SRCS= linux_compat.c \ linux_current.c \ linux_hrtimer.c \ linux_idr.c \ linux_kmod.c \ linux_kthread.c \ linux_lock.c \ linux_page.c \ linux_pci.c \ linux_radix.c \ linux_rcu.c \ linux_seq_file.c \ linux_schedule.c \ linux_shmemfs.c \ linux_slab.c \ linux_tasklet.c \ linux_usb.c \ linux_work.c -SRCS+= bus_if.h \ - device_if.h \ - pci_if.h \ - pci_iov_if.h \ - vnode_if.h \ - usb_if.h \ - opt_usb.h \ - opt_stack.h +SRCS+= ${LINUXKPI_GENSRCS} CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include .include Index: head/sys/modules/mlx4/Makefile =================================================================== --- head/sys/modules/mlx4/Makefile (revision 359184) +++ head/sys/modules/mlx4/Makefile (revision 359185) @@ -1,34 +1,35 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx4/mlx4_core KMOD= mlx4 -SRCS= device_if.h bus_if.h vnode_if.h pci_if.h pci_iov_if.h \ - opt_inet.h opt_inet6.h \ +SRCS= \ mlx4_alloc.c \ mlx4_catas.c \ mlx4_cmd.c \ mlx4_cq.c \ mlx4_eq.c \ mlx4_fw.c \ mlx4_fw_qos.c \ mlx4_icm.c \ mlx4_intf.c \ mlx4_main.c \ mlx4_mcg.c \ mlx4_mr.c \ mlx4_pd.c \ mlx4_port.c \ mlx4_profile.c \ mlx4_qp.c \ mlx4_reset.c \ mlx4_sense.c \ mlx4_srq.c \ mlx4_resource_tracker.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith Index: head/sys/modules/mlx4en/Makefile =================================================================== --- head/sys/modules/mlx4en/Makefile (revision 359184) +++ head/sys/modules/mlx4en/Makefile (revision 359185) @@ -1,18 +1,19 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx4/mlx4_en KMOD= mlx4en -SRCS= device_if.h bus_if.h pci_if.h pci_iov_if.h vnode_if.h \ - opt_inet.h opt_inet6.h \ +SRCS= \ mlx4_en_cq.c \ mlx4_en_main.c \ mlx4_en_netdev.c \ mlx4_en_port.c \ mlx4_en_resources.c \ mlx4_en_rx.c \ mlx4_en_tx.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .include Index: head/sys/modules/mlx4ib/Makefile =================================================================== --- head/sys/modules/mlx4ib/Makefile (revision 359184) +++ head/sys/modules/mlx4ib/Makefile (revision 359185) @@ -1,29 +1,30 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx4/mlx4_ib KMOD= mlx4ib -SRCS= device_if.h bus_if.h vnode_if.h pci_if.h pci_iov_if.h \ - opt_inet.h opt_inet6.h \ +SRCS= \ mlx4_ib_alias_GUID.c \ mlx4_ib_mcg.c \ mlx4_ib_sysfs.c \ mlx4_ib_ah.c \ mlx4_ib_cq.c \ mlx4_ib_doorbell.c \ mlx4_ib_mad.c \ mlx4_ib_main.c \ mlx4_ib_mr.c \ mlx4_ib_qp.c \ mlx4_ib_srq.c \ mlx4_ib_wc.c \ mlx4_ib_cm.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith Index: head/sys/modules/mlx5/Makefile =================================================================== --- head/sys/modules/mlx5/Makefile (revision 359184) +++ head/sys/modules/mlx5/Makefile (revision 359185) @@ -1,55 +1,55 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_core \ ${SRCTOP}/sys/dev/mlx5/mlx5_lib \ ${SRCTOP}/sys/dev/mlx5/mlx5_fpga KMOD=mlx5 SRCS= \ mlx5_alloc.c \ mlx5_cmd.c \ mlx5_cq.c \ mlx5_diagnostics.c \ mlx5_eq.c \ mlx5_eswitch.c \ mlx5_fs_cmd.c \ mlx5_fs_tree.c \ mlx5_fw.c \ mlx5_fwdump.c \ mlx5_health.c \ mlx5_mad.c \ mlx5_main.c \ mlx5_mcg.c \ mlx5_mpfs.c \ mlx5_mr.c \ mlx5_pagealloc.c \ mlx5_pd.c \ mlx5_port.c \ mlx5_qp.c \ mlx5_rl.c \ mlx5_srq.c \ mlx5_tls.c \ mlx5_transobj.c \ mlx5_uar.c \ mlx5_vport.c \ mlx5_vsc.c \ mlx5_wq.c \ -mlx5_gid.c \ -device_if.h bus_if.h vnode_if.h pci_if.h pci_iov_if.h \ -opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h +mlx5_gid.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .if defined(CONFIG_BUILD_FPGA) SRCS+= \ mlx5fpga_cmd.c \ mlx5fpga_core.c \ mlx5fpga_sdk.c \ mlx5fpga_trans.c \ mlx5fpga_xfer.c \ mlx5fpga_ipsec.c .endif .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Index: head/sys/modules/mlx5en/Makefile =================================================================== --- head/sys/modules/mlx5en/Makefile (revision 359184) +++ head/sys/modules/mlx5en/Makefile (revision 359185) @@ -1,37 +1,36 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_en KMOD=mlx5en SRCS= \ mlx5_en_dim.c \ mlx5_en_ethtool.c \ mlx5_en_main.c \ mlx5_en_tx.c \ mlx5_en_flow_table.c \ mlx5_en_hw_tls.c \ mlx5_en_rx.c \ mlx5_en_rl.c \ mlx5_en_txrx.c \ -mlx5_en_port_buffer.c \ -device_if.h bus_if.h vnode_if.h pci_if.h pci_iov_if.h \ -opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h \ -opt_kern_tls.h +mlx5_en_port_buffer.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h opt_kern_tls.h .if defined(HAVE_PER_CQ_EVENT_PACKET) CFLAGS+= -DHAVE_PER_CQ_EVENT_PACKET .endif .if defined(HAVE_TCP_LRO_RX) CFLAGS+= -DHAVE_TCP_LRO_RX .endif .if defined(CONFIG_BUILD_FPGA) CFLAGS+= -DCONFIG_MLX5_FPGA .endif CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Index: head/sys/modules/mlx5fpga_tools/Makefile =================================================================== --- head/sys/modules/mlx5fpga_tools/Makefile (revision 359184) +++ head/sys/modules/mlx5fpga_tools/Makefile (revision 359185) @@ -1,19 +1,18 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_fpga_tools KMOD=mlx5fpga_tools SRCS= \ mlx5fpga_tools_main.c \ mlx5fpga_tools_char.c -SRCS+= \ - device_if.h bus_if.h vnode_if.h pci_if.h pci_iov_if.h \ - opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} CFLAGS+= -DCONFIG_MLX5_FPGA -DCONFIG_MLX5_ACCEL Index: head/sys/modules/mlx5ib/Makefile =================================================================== --- head/sys/modules/mlx5ib/Makefile (revision 359184) +++ head/sys/modules/mlx5ib/Makefile (revision 359185) @@ -1,32 +1,32 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_ib KMOD=mlx5ib SRCS= \ mlx5_ib_ah.c \ mlx5_ib_cong.c \ mlx5_ib_cq.c \ mlx5_ib_doorbell.c \ mlx5_ib_gsi.c \ mlx5_ib_mad.c \ mlx5_ib_main.c \ mlx5_ib_mem.c \ mlx5_ib_mr.c \ mlx5_ib_qp.c \ mlx5_ib_srq.c \ -mlx5_ib_virt.c \ -device_if.h bus_if.h vnode_if.h pci_if.h pci_iov_if.h \ -opt_inet.h opt_inet6.h opt_ratelimit.h +mlx5_ib_virt.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h opt_ratelimit.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM .if defined(CONFIG_BUILD_FPGA) CFLAGS+= -DCONFIG_MLX5_FPGA .endif .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} Index: head/sys/modules/mlxfw/Makefile =================================================================== --- head/sys/modules/mlxfw/Makefile (revision 359184) +++ head/sys/modules/mlxfw/Makefile (revision 359185) @@ -1,17 +1,17 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlxfw KMOD=mlxfw SRCS= \ mlxfw_fsm.c \ mlxfw_mfa2.c \ -mlxfw_mfa2_tlv_multi.c \ -device_if.h bus_if.h vnode_if.h pci_if.h +mlxfw_mfa2_tlv_multi.c +SRCS+= ${LINUXKPI_GENSRCS} CFLAGS+= \ -I${SRCTOP}/sys/ofed/include \ -I${SRCTOP}/sys/compat/linuxkpi/common/include \ -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz .include Index: head/sys/modules/mthca/Makefile =================================================================== --- head/sys/modules/mthca/Makefile (revision 359184) +++ head/sys/modules/mthca/Makefile (revision 359185) @@ -1,35 +1,35 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mthca KMOD= mthca SRCS= \ mthca_allocator.c \ mthca_av.c \ mthca_catas.c \ mthca_cmd.c \ mthca_cq.c \ mthca_eq.c \ mthca_mad.c \ mthca_main.c \ mthca_mcg.c \ mthca_memfree.c \ mthca_mr.c \ mthca_pd.c \ mthca_profile.c \ mthca_provider.c \ mthca_qp.c \ mthca_reset.c \ mthca_srq.c \ -mthca_uar.c \ -device_if.h bus_if.h vnode_if.h pci_if.h \ - opt_inet.h opt_inet6.h +mthca_uar.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith Index: head/sys/modules/qlnx/qlnxe/Makefile =================================================================== --- head/sys/modules/qlnx/qlnxe/Makefile (revision 359184) +++ head/sys/modules/qlnx/qlnxe/Makefile (revision 359185) @@ -1,98 +1,93 @@ #/* # * Copyright (c) 2017-2018 Cavium, Inc. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * 1. Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * 2. Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in the # * documentation and/or other materials provided with the distribution. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # * POSSIBILITY OF SUCH DAMAGE. # */ #/* # * File : Makefile # * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131. # */ # # $FreeBSD$ # .PATH: ${SRCTOP}/sys/dev/qlnx/qlnxe #.PATH: ${.CURDIR} KMOD=if_qlnxe SRCS=ecore_cxt.c ecore_dcbx.c ecore_dev.c ecore_hw.c SRCS+=ecore_init_fw_funcs.c ecore_int.c ecore_mcp.c SRCS+=ecore_sp_commands.c ecore_spq.c ecore_l2.c SRCS+=ecore_init_ops.c ecore_dbg_fw_funcs.c SRCS+=ecore_mng_tlv.c SRCS+=ecore_sriov.c SRCS+=ecore_vf.c #roce/iwarp files. Compilation can be turned off roce/iwarp are not required. # In other words if you don't need RDMA please comment out SRCS adds for # ecore_rdma.c ecore_roce.c ecore_iwarp.c ecore_ooo.c ecore_ll2.c qlnx_rdma.c SRCS+=ecore_rdma.c SRCS+=ecore_roce.c SRCS+=ecore_iwarp.c SRCS+=ecore_ooo.c SRCS+=ecore_ll2.c SRCS+=qlnx_rdma.c - SRCS+=qlnx_ioctl.c SRCS+=qlnx_os.c -SRCS+= device_if.h -SRCS+= bus_if.h -SRCS+= pci_if.h -SRCS+= pci_iov_if.h - +SRCS+= ${LINUXKPI_GENSRCS} .include #CFLAGS += -DQLNX_DEBUG CFLAGS += -DECORE_PACKAGE CFLAGS += -DCONFIG_ECORE_L2 CFLAGS += -DECORE_CONFIG_DIRECT_HWFN CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include #CFLAGS += -g #CFLAGS += -fno-inline #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE #CFLAGS += -DQLNX_USER_LLDP CFLAGS += -DCONFIG_ECORE_SRIOV # For roce/iwarp files. Compilation can be turned off if roce/iwarp are not required. # In other words if you don't need RDMA please comment out the CFLAGS which define # CONFIG_ECORE_LL2 CONFIG_ECORE_ROCE CONFIG_ECORE_IWARP QLNX_ENABLE_IWARP CFLAGS += -DCONFIG_ECORE_LL2 CFLAGS += -DCONFIG_ECORE_ROCE CFLAGS += -DCONFIG_ECORE_IWARP CFLAGS += -DCONFIG_ECORE_RDMA CFLAGS += -DQLNX_ENABLE_IWARP CWARNFLAGS+= -Wno-cast-qual Index: head/sys/modules/qlnx/qlnxev/Makefile =================================================================== --- head/sys/modules/qlnx/qlnxev/Makefile (revision 359184) +++ head/sys/modules/qlnx/qlnxev/Makefile (revision 359185) @@ -1,79 +1,76 @@ #/* # * Copyright (c) 2017-2018 Cavium, Inc. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * 1. Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * 2. Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in the # * documentation and/or other materials provided with the distribution. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # * POSSIBILITY OF SUCH DAMAGE. # */ # /* # * File : Makefile # * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131. # */ # # $FreeBSD$ # .PATH: ${SRCTOP}/sys/dev/qlnx/qlnxe #.PATH: ${.CURDIR}/../qlnxe KMOD=if_qlnxev SRCS=ecore_cxt.c ecore_dcbx.c ecore_dev.c ecore_hw.c SRCS+=ecore_init_fw_funcs.c ecore_int.c ecore_mcp.c SRCS+=ecore_sp_commands.c ecore_spq.c ecore_l2.c SRCS+=ecore_init_ops.c ecore_dbg_fw_funcs.c SRCS+=ecore_mng_tlv.c #SRIOV related SRCS+=ecore_sriov.c SRCS+=ecore_vf.c SRCS+=qlnx_ioctl.c SRCS+=qlnx_os.c -SRCS+= device_if.h -SRCS+= bus_if.h -SRCS+= pci_if.h -SRCS+= pci_iov_if.h +SRCS+= ${LINUXKPI_GENSRCS} .include CFLAGS += -DQLNX_DEBUG CFLAGS += -DECORE_PACKAGE CFLAGS += -DCONFIG_ECORE_L2 CFLAGS += -DECORE_CONFIG_DIRECT_HWFN CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS += -g CFLAGS += -fno-inline #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE #SRIOV related CFLAGS += -DCONFIG_ECORE_SRIOV CFLAGS += -DQLNX_VF CWARNFLAGS+= -Wno-cast-qual Index: head/sys/modules/qlnx/qlnxr/Makefile =================================================================== --- head/sys/modules/qlnx/qlnxr/Makefile (revision 359184) +++ head/sys/modules/qlnx/qlnxr/Makefile (revision 359185) @@ -1,87 +1,88 @@ #/* # * Copyright (c) 2017-2018 Cavium, Inc. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * 1. Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * 2. Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in the # * documentation and/or other materials provided with the distribution. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # * POSSIBILITY OF SUCH DAMAGE. # */ #/* # * File : Makefile # * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131. # */ # # $FreeBSD$ # #.PATH: ${.CURDIR} #OFEDDIR= /usr/src/sys #ETHDRVR=${.CURDIR}/../qlnxe .PATH: ${SRCTOP}/sys/dev/qlnx/qlnxr OFEDDIR=${SRCTOP}/sys ETHDRVR=${SRCTOP}/sys/dev/qlnx/qlnxe KMOD= qlnxr -SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ - opt_inet.h opt_inet6.h \ +SRCS= \ qlnxr_os.c\ qlnxr_cm.c\ qlnxr_verbs.c +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_inet.h opt_inet6.h .include CFLAGS+= -I${.CURDIR} CFLAGS+= -I${ETHDRVR} CFLAGS+= -I${OFEDDIR}/ofed/include CFLAGS+= -I${OFEDDIR}/ofed/include/uapi CFLAGS+= -I${OFEDDIR}/compat/linuxkpi/common/include CFLAGS+= -DLINUX_TYPES_DEFINED CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET #CFLAGS+= -DDEFINE_NO_IP_BASED_GIDS CWARNEXTRA += -Wno-cast-qual CWARNEXTRA += -Wno-unused-function .if ${COMPILER_TYPE} == "clang" CWARNEXTRA += -Wno-gnu-variable-sized-type-not-at-end .endif CWARNEXTRA += -Wno-missing-prototypes CWARNEXTRA += ${NO_WCONSTANT_CONVERSION} CWARNEXTRA += -Wno-format CWARNEXTRA += ${NO_WSHIFT_COUNT_OVERFLOW} CWARNEXTRA += -Wno-empty-body CFLAGS += -DQLNX_DEBUG CFLAGS += -DECORE_PACKAGE CFLAGS += -DCONFIG_ECORE_L2 CFLAGS += -DCONFIG_ECORE_LL2 CFLAGS += -DCONFIG_ECORE_ROCE CFLAGS += -DCONFIG_ECORE_IWARP CFLAGS += -DCONFIG_ECORE_RDMA CFLAGS += -DECORE_CONFIG_DIRECT_HWFN CFLAGS += -g -fno-inline CFLAGS += -DQLNX_RDMA CFLAGS+= -Wno-cast-qual -Wno-pointer-arith Index: head/sys/modules/rdma/krping/Makefile =================================================================== --- head/sys/modules/rdma/krping/Makefile (revision 359184) +++ head/sys/modules/rdma/krping/Makefile (revision 359185) @@ -1,12 +1,12 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/contrib/rdma/krping KMOD= krping SRCS= krping.c krping_dev.c getopt.c -SRCS+= bus_if.h device_if.h pci_if.h pci_iov_if.h pcib_if.h vnode_if.h +SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_sched.h opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include .include