tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: fdcbcd1348f4ef713668bae1b0fa9774e1811205 commit: 64a8f92fd783e750cdb81af75942dcd53bbf61bd [14063/14948] dma-buf: add dma_fence_unwrap v2 config: mips-randconfig-r033-20220331 (https://download.01.org/0day-ci/archive/20220331/202203311933.UhSJPTbf-lkp@xxxxxxxxx/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 881350a92d821d4f8e4fa648443ed1d17e251188) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=64a8f92fd783e750cdb81af75942dcd53bbf61bd git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 64a8f92fd783e750cdb81af75942dcd53bbf61bd # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/dma-buf/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): drivers/dma-buf/st-dma-fence-unwrap.c:125:6: warning: variable 'err' set but not used int err = 0; ^ drivers/dma-buf/st-dma-fence-unwrap.c:167:6: warning: variable 'err' set but not used int err = 0; ^ drivers/dma-buf/st-dma-fence-unwrap.c:209:6: warning: variable 'err' set but not used int err = 0; ^ >> drivers/dma-buf/st-dma-fence-unwrap.c:25:4: warning: unused function 'to_mock_fence' } dma_fence { ^ fatal error: error in backend: Nested variants found in inline asm string: ' .set push .set mips64r2 .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 156, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif 1: ll $1, $2 # atomic_fetch_sub subu $0, $1, $3 sc $0, $2 beqz $0, 1b .set pop move $0, $1 ' PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: clang -Wp,-MMD,drivers/dma-buf/.st-dma-fence-unwrap.o.d -nostdinc -Iarch/mips/include -I./arch/mips/include/generated -Iinclude -I./include -Iarch/mips/include/uapi -I./arch/mips/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -DVMLINUX_LOAD_ADDRESS=0xffffffff94100000 -DLINKER_LOAD_ADDRESS=0x94100000 -DDATAOFFSET=0 -Qunused-arguments -fmacro-prefix-map== -DKBUILD_EXTRA_WARN1 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 --target=mipsel-linux -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-check-zero-division -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float -ffreestanding -EL -fno-stack-check -march=mips32 -Wa,--trap -DTOOLCHAIN_SUPPORTS_VIRT -Iarch/mips/include/asm/mach-ar7 -Iarch/mips/include/asm/mach-generic -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=1024 -fstack-protector -Wimplicit-fallthrough -Wno-gnu -mno-global-merge -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-stack-clash-protection -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -I drivers/dma-buf -I ./drivers/dma-buf -DKBUILD_MODFILE="drivers/dma-buf/dmabuf_selftests" -DKBUILD_BASENAME="st_dma_fence_unwrap" -DKBUILD_MODNAME="dmabuf_selftests" -D__KBUILD_MODNAME=kmod_dmabuf_selftests -c -o drivers/dma-buf/st-dma-fence-unwrap.o drivers/dma-buf/st-dma-fence-unwrap.c 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'drivers/dma-buf/st-dma-fence-unwrap.c'. 4. Running pass 'Mips Assembly Printer' on function '@sanitycheck' #0 0x000056545ac5406f Signals.cpp:0:0 #1 0x000056545ac51e94 llvm::sys::CleanupOnSignal(unsigned long) (/opt/cross/clang-881350a92d/bin/clang-15+0x34bee94) #2 0x000056545ab91797 llvm::CrashRecoveryContext::HandleExit(int) (/opt/cross/clang-881350a92d/bin/clang-15+0x33fe797) #3 0x000056545ac4a4ce llvm::sys::Process::Exit(int, bool) (/opt/cross/clang-881350a92d/bin/clang-15+0x34b74ce) #4 0x00005654588391eb (/opt/cross/clang-881350a92d/bin/clang-15+0x10a61eb) #5 0x000056545ab982bc llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/cross/clang-881350a92d/bin/clang-15+0x34052bc) #6 0x000056545b8b82b0 llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const (/opt/cross/clang-881350a92d/bin/clang-15+0x41252b0) #7 0x000056545b8b41e2 llvm::AsmPrinter::emitFunctionBody() (/opt/cross/clang-881350a92d/bin/clang-15+0x41211e2) #8 0x00005654592b9d47 llvm::MipsAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/cross/clang-881350a92d/bin/clang-15+0x1b26d47) #9 0x0000565459f8cbdd llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0 #10 0x000056545a3d4c27 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-881350a92d/bin/clang-15+0x2c41c27) #11 0x000056545a3d4da1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-881350a92d/bin/clang-15+0x2c41da1) #12 0x000056545a3d591f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-881350a92d/bin/clang-15+0x2c4291f) #13 0x000056545af751a7 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/cross/clang-881350a92d/bin/clang-15+0x37e21a7) #14 0x000056545bbd8b03 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-881350a92d/bin/clang-15+0x4445b03) #15 0x000056545c709f31 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-881350a92d/bin/clang-15+0x4f76f31) #16 0x000056545bbd81e5 clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-881350a92d/bin/clang-15+0x44451e5) #17 0x000056545b5cfb31 clang::FrontendAction::Execute() (/opt/cross/clang-881350a92d/bin/clang-15+0x3e3cb31) #18 0x000056545b5652da clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-881350a92d/bin/clang-15+0x3dd22da) #19 0x000056545b69686b (/opt/cross/clang-881350a92d/bin/clang-15+0x3f0386b) #20 0x000056545883a79c cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-881350a92d/bin/clang-15+0x10a779c) #21 0x000056545883745b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0 #22 0x000056545b3fbd65 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const::'lambda'()>(long) Job.cpp:0:0 #23 0x000056545ab91653 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/cross/clang-881350a92d/bin/clang-15+0x33fe653) #24 0x000056545b3fc65e clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const (.part.216) Job.cpp:0:0 #25 0x000056545b3d0ed7 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const (/opt/cross/clang-881350a92d/bin/clang-15+0x3c3ded7) #26 0x000056545b3d18b7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) const (/opt/cross/clang-881350a92d/bin/clang-15+0x3c3e8b7) #27 0x000056545b3daf09 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) (/opt/cross/clang-881350a92d/bin/clang-15+0x3c47f09) #28 0x00005654587849cf main (/opt/cross/clang-881350a92d/bin/clang-15+0xff19cf) #29 0x00007f216760d7fd __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x237fd) #30 0x0000565458836f7a _start (/opt/cross/clang-881350a92d/bin/clang-15+0x10a3f7a) clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 15.0.0 (git://gitmirror/llvm_project 881350a92d821d4f8e4fa648443ed1d17e251188) Target: mipsel-unknown-linux Thread model: posix InstalledDir: /opt/cross/clang-881350a92d/bin clang-15: note: diagnostic msg: Makefile arch drivers include kernel mm nr_bisected scripts source usr vim +/to_mock_fence +25 drivers/dma-buf/st-dma-fence-unwrap.c 21 22 static inline struct mock_fence { 23 struct dma_fence base; 24 spinlock_t lock; > 25 } *to_mock_fence(struct dma_fence *f) { 26 return container_of(f, struct mock_fence, base); 27 } 28 -- 0-DAY CI Kernel Test Service https://01.org/lkp